Skip to content

Commit

Permalink
feat: include @rspack/react-refresh-plugin with Re.Pack (#810)
Browse files Browse the repository at this point in the history
* refactor: move react refresh plugin from peerDeps to deps in repack

* refactor: dont include refresh plugin when using repack-init

* chore: remove react refresh plugin from depdencies in testers

* chore: remove duplicated react refresh plugin entry in repack

* chore: add changeset
  • Loading branch information
jbroma authored Dec 6, 2024
1 parent c467e06 commit 46330d7
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .changeset/cold-chefs-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@callstack/repack": minor
"@callstack/repack-init": minor
---

Include `@rspack/plugin-react-refresh` with Re.Pack instead of requiring user to install it
1 change: 0 additions & 1 deletion apps/tester-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"@react-native/typescript-config": "0.76.1",
"@rsdoctor/rspack-plugin": "^0.4.5",
"@rspack/core": "1.0.8",
"@rspack/plugin-react-refresh": "1.0.0",
"@svgr/webpack": "^8.1.0",
"@swc/helpers": "^0.5.13",
"@types/jest": "^29.5.12",
Expand Down
1 change: 0 additions & 1 deletion apps/tester-federation-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
"@react-native-community/cli-platform-android": "15.0.1",
"@rsdoctor/rspack-plugin": "^0.4.5",
"@rspack/core": "1.0.8",
"@rspack/plugin-react-refresh": "1.0.0",
"@swc/helpers": "^0.5.13",
"@types/jest": "^29.5.12",
"@types/react": "^18.2.51",
Expand Down
1 change: 0 additions & 1 deletion apps/tester-federation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"@react-native-community/cli-platform-android": "15.0.1",
"@rsdoctor/rspack-plugin": "^0.4.5",
"@rspack/core": "1.0.8",
"@rspack/plugin-react-refresh": "1.0.0",
"@swc/helpers": "^0.5.13",
"@types/jest": "^29.5.12",
"@types/react": "^18.2.51",
Expand Down
2 changes: 0 additions & 2 deletions packages/init/src/tasks/addDependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import logger from '../utils/logger.js';

const rspackDependencies = [
'@rspack/[email protected]', // 1.0.4 breaks sourcemaps
'@rspack/plugin-react-refresh',
'babel-loader', // still needed for codegen
'@swc/helpers',
'@callstack/repack',
Expand All @@ -18,7 +17,6 @@ const webpackDependencies = [
'webpack',
'terser-webpack-plugin',
'babel-loader',
'@rspack/plugin-react-refresh',
'@callstack/repack',
];

Expand Down
3 changes: 1 addition & 2 deletions packages/repack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"@react-native-community/cli": "*",
"@react-native-community/cli-types": "*",
"@rspack/core": ">=1",
"@rspack/plugin-react-refresh": ">=1",
"react-native": ">=0.74",
"webpack": ">=5.90"
},
Expand All @@ -78,6 +77,7 @@
"dependencies": {
"@callstack/repack-dev-server": "workspace:*",
"@discoveryjs/json-ext": "^0.5.7",
"@rspack/plugin-react-refresh": "1.0.0",
"colorette": "^2.0.20",
"dedent": "^0.7.0",
"events": "^3.3.0",
Expand All @@ -103,7 +103,6 @@
"@module-federation/enhanced": "0.6.10",
"@module-federation/sdk": "0.6.10",
"@rspack/core": "1.0.8",
"@rspack/plugin-react-refresh": "1.0.0",
"@swc/helpers": "0.5.13",
"@types/dedent": "^0.7.0",
"@types/jest": "^29.5.12",
Expand Down
15 changes: 3 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 46330d7

Please sign in to comment.