We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
require
1 parent 911639c commit 83c20a4Copy full SHA for 83c20a4
packages/core/rslib.config.ts
@@ -2,6 +2,7 @@ import fs from 'node:fs';
2
import path from 'node:path';
3
import { pluginPublint } from 'rsbuild-plugin-publint';
4
import { defineConfig, type rsbuild, rspack } from 'rslib';
5
+import packageJson from './package.json' with { type: 'json' };
6
7
const pluginFixDtsTypes: rsbuild.RsbuildPlugin = {
8
name: 'fix-dts-types',
@@ -45,7 +46,7 @@ export default defineConfig({
45
46
entryModuleLoader: './src/plugins/entryModuleLoader.ts',
47
},
48
define: {
- RSLIB_VERSION: JSON.stringify(require('./package.json').version),
49
+ RSLIB_VERSION: JSON.stringify(packageJson.version),
50
51
52
// externalize pre-bundled dependencies
0 commit comments