Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move swc helpers and react-refresh to peer #5228

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions diffcases/arco-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"less-loader": "^11.1.0",
"mini-css-extract-plugin": "^2.6.1",
"postcss-loader": "7.0.2",
"react-refresh": "^0.14.0",
"serve": "14.1.2",
"style-loader": "^3.3.3",
"swc-loader": "^0.2.3",
Expand Down
8 changes: 5 additions & 3 deletions examples/arco-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@arco-design/web-react": "2.29.2",
"@arco-themes/react-arco-pro": "^0.0.7",
"@loadable/component": "^5.15.2",
"@swc/helpers": "0.5.1",
"@turf/turf": "^6.5.0",
"arco-design-pro": "^2.3.0",
"axios": "^0.24.0",
Expand All @@ -37,19 +38,20 @@
"regenerator-runtime": "0.13.9"
},
"devDependencies": {
"serve": "14.1.2",
"@rspack/plugin-react-refresh": "workspace:*",
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"@rspack/plugin-html": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"@svgr/webpack": "^6.5.1",
"@swc/core": "^1.3.14",
"bundle-stats": "^4.1.2",
"css-loader": "^6.7.1",
"html-webpack-plugin": "^5.5.0",
"less-loader": "^11.1.0",
"postcss-loader": "7.0.2",
"mini-css-extract-plugin": "^2.6.1",
"postcss-loader": "7.0.2",
"react-refresh": "^0.14.0",
"serve": "14.1.2",
"style-loader": "^3.3.1",
"swc-loader": "^0.2.3"
},
Expand Down
3 changes: 2 additions & 1 deletion examples/builtin-swc-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"react-refresh": "0.14.0"
},
"devDependencies": {
"@rspack/core": "workspace:*"
"@rspack/core": "workspace:*",
"@swc/helpers": "0.5.1"
}
}
2 changes: 2 additions & 0 deletions examples/cra-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "0.1.1",
"private": true,
"dependencies": {
"@swc/helpers": "0.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"react-refresh": "^0.14.0",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions examples/cra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@swc/helpers": "0.5.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"react-refresh": "^0.14.0",
"web-vitals": "^2.1.4"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions examples/module-federation-v1.5/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"html-webpack-plugin": "^5.5.0",
"react-refresh": "^0.14.0",
"serve": "14.1.2"
}
}
1 change: 1 addition & 0 deletions examples/module-federation-v1.5/lib1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"html-webpack-plugin": "^5.5.0",
"react-refresh": "^0.14.0",
"serve": "14.1.2"
}
}
1 change: 1 addition & 0 deletions examples/module-federation-v1.5/lib2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"react-refresh": "^0.14.0",
"serve": "14.1.2"
}
}
1 change: 1 addition & 0 deletions examples/module-federation-v1/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"html-webpack-plugin": "^5.5.0",
"react-refresh": "^0.14.0",
"serve": "14.1.2"
}
}
1 change: 1 addition & 0 deletions examples/module-federation-v1/lib1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"html-webpack-plugin": "^5.5.0",
"react-refresh": "^0.14.0",
"serve": "14.1.2"
}
}
1 change: 1 addition & 0 deletions examples/module-federation-v1/lib2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"react-refresh": "^0.14.0",
"serve": "14.1.2"
}
}
1 change: 1 addition & 0 deletions examples/react-15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "MIT",
"dependencies": {
"@rspack/cli": "workspace:*",
"@swc/helpers": "0.5.1",
"react": "15.7.0",
"react-dom": "15.7.0",
"react-refresh": "0.14.0"
Expand Down
6 changes: 4 additions & 2 deletions examples/react-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
"storybook": "storybook dev -p 6006"
},
"dependencies": {
"@swc/helpers": "0.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"@storybook/addon-essentials": "^7.0.0",
"@storybook/addon-interactions": "^7.0.0",
"@storybook/addon-links": "^7.0.0",
Expand All @@ -23,8 +25,8 @@
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"prop-types": "^15.8.1",
"react-refresh": "^0.14.0",
"storybook": "^7.0.0",
"storybook-react-rspack": "7.0.0-rc.18",
"@rspack/core": "workspace:*"
"storybook-react-rspack": "7.0.0-rc.18"
}
}
8 changes: 5 additions & 3 deletions examples/react-with-less/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
"license": "MIT",
"dependencies": {
"@rspack/cli": "workspace:*",
"@swc/helpers": "0.5.1",
"less-loader": "11.1.0",
"normalize.css": "8.0.1",
"react": "17.0.0",
"react-dom": "17.0.0",
"normalize.css": "8.0.1"
"react-dom": "17.0.0"
},
"devDependencies": {
"@rspack/core": "workspace:*"
"@rspack/core": "workspace:*",
"react-refresh": "^0.14.0"
}
}
4 changes: 3 additions & 1 deletion examples/react-with-sass/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
"license": "MIT",
"dependencies": {
"@rspack/cli": "workspace:*",
"@swc/helpers": "0.5.1",
"react": "17.0.0",
"react-dom": "17.0.0",
"sass-loader": "^13.2.0"
},
"devDependencies": {
"@rspack/core": "workspace:*"
"@rspack/core": "workspace:*",
"react-refresh": "^0.14.0"
}
}
1 change: 1 addition & 0 deletions examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "MIT",
"dependencies": {
"@rspack/cli": "workspace:*",
"@swc/helpers": "0.5.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-refresh": "0.14.0"
Expand Down
8 changes: 5 additions & 3 deletions examples/styled-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@
"build": "rspack build"
},
"dependencies": {
"styled-components": "5.3.6",
"@swc/helpers": "0.5.1",
"@types/styled-components": "5.1.26",
"react": "17",
"react-dom": "17"
"react-dom": "17",
"styled-components": "5.3.6"
},
"devDependencies": {
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*"
"@rspack/core": "workspace:*",
"react-refresh": "^0.14.0"
},
"sideEffects": false,
"keywords": [],
Expand Down
9 changes: 6 additions & 3 deletions examples/svgr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@
"license": "ISC",
"devDependencies": {
"@rspack/cli": "workspace:*",
"@rspack/core": "workspace:*",
"@svgr/webpack": "6.5.1",
"react": "15",
"react-dom": "15",
"url-loader": "4.1.1",
"@svgr/webpack": "6.5.1",
"@rspack/core": "workspace:*"
"url-loader": "4.1.1"
},
"dependencies": {
"@swc/helpers": "0.5.1"
}
}
3 changes: 2 additions & 1 deletion packages/create-rspack/template-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@rspack/plugin-react-refresh": "0.4.0",
"@types/react": "18.2.0",
"@types/react-dom": "18.2.1",
"typescript": "^5.0.4"
"typescript": "^5.0.4",
"react-refresh": "^0.14.0"
}
}
3 changes: 2 additions & 1 deletion packages/create-rspack/template-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@rspack/cli": "0.4.0",
"@rspack/core": "0.4.0",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8"
"@types/react-dom": "^18.0.8",
"react-refresh": "^0.14.0"
}
}
2 changes: 2 additions & 0 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
"@rspack/core": "workspace:*",
"@rspack/dev-server": "workspace:*",
"@rspack/plugin-react-refresh": "workspace:*",
"@swc/helpers": "0.5.1",
"@types/fs-extra": "11.0.1",
"babel-loader": "^9.1.3",
"fs-extra": "11.1.1",
"postcss": "^8.4.21",
"postcss-loader": "^7.3.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-refresh": "^0.14.0",
"tailwindcss": "^3.3.0",
"vue": "3.3.7",
"vue-loader": "^17.3.1",
Expand Down
11 changes: 8 additions & 3 deletions packages/rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,24 @@
"dependencies": {
"@module-federation/runtime-tools": "0.0.0-next-20240102063242",
"@rspack/binding": "workspace:*",
"@swc/helpers": "0.5.1",
ahabhgk marked this conversation as resolved.
Show resolved Hide resolved
"browserslist": "^4.21.3",
"compare-versions": "6.0.0-rc.1",
"enhanced-resolve": "5.12.0",
"graceful-fs": "4.2.10",
"json-parse-even-better-errors": "^3.0.0",
"neo-async": "2.6.2",
"react-refresh": "0.14.0",
"tapable": "2.2.1",
"terminal-link": "^2.1.1",
"watchpack": "^2.4.0",
"webpack-sources": "3.2.3",
"zod": "^3.21.4",
"zod-validation-error": "1.3.1"
},
"peerDependencies": {
"@swc/helpers": ">=0.5.1"
},
"peerDependenciesMeta": {
"@swc/helpers": {
"optional": true
}
}
}
2 changes: 0 additions & 2 deletions packages/rspack/src/rspackOptionsApply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
} from ".";
import fs from "graceful-fs";

import { ResolveSwcPlugin } from "./web/ResolveSwcPlugin";
import { DefaultStatsFactoryPlugin } from "./stats/DefaultStatsFactoryPlugin";
import { DefaultStatsPrinterPlugin } from "./stats/DefaultStatsPrinterPlugin";
import { cleverMerge } from "./util/cleverMerge";
Expand Down Expand Up @@ -327,7 +326,6 @@ export class RspackOptionsApply {

new WarnCaseSensitiveModulesPlugin().apply(compiler);

new ResolveSwcPlugin().apply(compiler);
new WorkerPlugin(
options.output.workerChunkLoading!,
options.output.workerWasmLoading!,
Expand Down
22 changes: 0 additions & 22 deletions packages/rspack/src/web/ResolveSwcPlugin.ts

This file was deleted.

Loading
Loading