Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 committed Dec 10, 2024
1 parent 1135aee commit 98dfde8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
9 changes: 8 additions & 1 deletion examples/react-component-umd/rslib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,12 @@ export default defineConfig({
output: {
target: 'web',
},
plugins: [pluginReact(), pluginSass()],
plugins: [
pluginReact({
swcReactOptions: {
runtime: 'classic',
},
}),
pluginSass(),
],
});
2 changes: 1 addition & 1 deletion examples/react-component-umd/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsx": "react",
"lib": ["DOM", "ESNext"],
"moduleResolution": "node",
"resolveJsonModule": true,
Expand Down
4 changes: 3 additions & 1 deletion tests/e2e/react-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"scripts": {
"dev:bundle": "../../node_modules/.bin/rsbuild dev --environment=bundle",
"dev:bundle-false": "../../node_modules/.bin/rsbuild dev --environment=bundleFalse",
"dev:umd": "../../node_modules/.bin/rsbuild dev --environment=umd"
"dev:umd": "pnpm umd:build && pnpm umd:copy && ../../node_modules/.bin/rsbuild dev --environment=umd",
"umd:build": "cd ../../../examples/react-component-umd && pnpm run build",
"umd:copy": "rm -rf ./public && mkdir -p ./public/umd && cp ../../../examples/react-component-umd/dist/umd/index.js ./public/umd/index.js"
},
"dependencies": {
"@examples/react-component-bundle": "workspace:*",
Expand Down
8 changes: 7 additions & 1 deletion tests/e2e/react-component/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,11 @@ export default defineConfig({
output: {
target: 'web',
},
plugins: [pluginReact()],
plugins: [
pluginReact({
swcReactOptions: {
runtime: 'classic',
},
}),
],
});

0 comments on commit 98dfde8

Please sign in to comment.