File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export default defineConfig({
99 bundle : false ,
1010 distPath : './dist-types' ,
1111 } ,
12+ banner : {
13+ js : `import { createRequire } from 'module';
14+ var require = createRequire(import.meta.url);\n` ,
15+ } ,
1216 } ,
1317 ] ,
1418 source : {
Original file line number Diff line number Diff line change 1- import { createRequire } from 'node:module' ;
21import path from 'node:path' ;
32import type { RsbuildConfig , RsbuildPlugin } from '@rsbuild/core' ;
43import { CSS_EXTENSIONS_PATTERN } from '../constant' ;
54import { RemoveCssExtractAssetPlugin } from './RemoveCssExtractAssetPlugin' ;
65
7- const require = createRequire ( import . meta. url ) ;
8-
96export const RSLIB_TEMP_CSS_DIR = '__rslib_css__' ;
107
118// https://rsbuild.dev/zh/config/output/css-modules#cssmodulesauto
You can’t perform that action at this time.
0 commit comments