File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed
examples/react-component-umd
tests/e2e/react-component Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -20,5 +20,12 @@ export default defineConfig({
20
20
output : {
21
21
target : 'web' ,
22
22
} ,
23
- plugins : [ pluginReact ( ) , pluginSass ( ) ] ,
23
+ plugins : [
24
+ pluginReact ( {
25
+ swcReactOptions : {
26
+ runtime : 'classic' ,
27
+ } ,
28
+ } ) ,
29
+ pluginSass ( ) ,
30
+ ] ,
24
31
} ) ;
Original file line number Diff line number Diff line change 7
7
"esModuleInterop" : true ,
8
8
"forceConsistentCasingInFileNames" : true ,
9
9
"isolatedModules" : true ,
10
- "jsx" : " react-jsx " ,
10
+ "jsx" : " react" ,
11
11
"lib" : [" DOM" , " ESNext" ],
12
12
"moduleResolution" : " node" ,
13
13
"resolveJsonModule" : true ,
Original file line number Diff line number Diff line change 5
5
"scripts" : {
6
6
"dev:bundle" : " ../../node_modules/.bin/rsbuild dev --environment=bundle" ,
7
7
"dev:bundle-false" : " ../../node_modules/.bin/rsbuild dev --environment=bundleFalse" ,
8
- "dev:umd" : " ../../node_modules/.bin/rsbuild dev --environment=umd"
8
+ "dev:umd" : " pnpm umd:build && pnpm umd:copy && ../../node_modules/.bin/rsbuild dev --environment=umd" ,
9
+ "umd:build" : " cd ../../../examples/react-component-umd && pnpm run build" ,
10
+ "umd:copy" : " rm -rf ./public && mkdir -p ./public/umd && cp ../../../examples/react-component-umd/dist/umd/index.js ./public/umd/index.js"
9
11
},
10
12
"dependencies" : {
11
13
"@examples/react-component-bundle" : " workspace:*" ,
Original file line number Diff line number Diff line change @@ -63,5 +63,11 @@ export default defineConfig({
63
63
output : {
64
64
target : 'web' ,
65
65
} ,
66
- plugins : [ pluginReact ( ) ] ,
66
+ plugins : [
67
+ pluginReact ( {
68
+ swcReactOptions : {
69
+ runtime : 'classic' ,
70
+ } ,
71
+ } ) ,
72
+ ] ,
67
73
} ) ;
You can’t perform that action at this time.
0 commit comments