-
-
Notifications
You must be signed in to change notification settings - Fork 763
feat(@rspack-cli): make @rspack/dev-server and webpack-bundle-analyzer peer dependencies #12682
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -34,13 +34,12 @@ | |||||||
| }, | ||||||||
| "dependencies": { | ||||||||
| "@discoveryjs/json-ext": "^0.5.7", | ||||||||
| "@rspack/dev-server": "~1.1.5", | ||||||||
| "exit-hook": "^4.0.0", | ||||||||
| "webpack-bundle-analyzer": "4.10.2" | ||||||||
| "exit-hook": "^4.0.0" | ||||||||
| }, | ||||||||
| "devDependencies": { | ||||||||
| "@rslib/core": "0.19.1", | ||||||||
| "@rspack/core": "workspace:*", | ||||||||
| "@rspack/dev-server": "~1.1.5", | ||||||||
| "@rspack/test-tools": "workspace:*", | ||||||||
| "@types/webpack-bundle-analyzer": "^4.7.0", | ||||||||
| "cac": "^6.7.14", | ||||||||
|
|
@@ -50,10 +49,24 @@ | |||||||
| "picocolors": "^1.1.1", | ||||||||
| "pirates": "^4.0.7", | ||||||||
| "ts-node": "^10.9.2", | ||||||||
| "typescript": "^5.9.3" | ||||||||
| "typescript": "^5.9.3", | ||||||||
| "webpack-bundle-analyzer": "4.10.2" | ||||||||
| }, | ||||||||
| "peerDependencies": { | ||||||||
| "@rspack/core": "^1.0.0-alpha || ^1.x" | ||||||||
| "@rspack/core": "^1.0.0-alpha || ^1.x", | ||||||||
| "@rspack/dev-server": "~1.1.5", | ||||||||
| "webpack-bundle-analyzer": "4.10.2" | ||||||||
| }, | ||||||||
| "peerDependenciesMeta": { | ||||||||
| "@rspack/core": { | ||||||||
| "optional": false | ||||||||
| }, | ||||||||
|
Comment on lines
+61
to
+63
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Comment on lines
+61
to
+63
|
||||||||
| "@rspack/core": { | |
| "optional": false | |
| }, |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -40,6 +40,18 @@ export class PreviewCommand implements RspackCommand { | |||||
| setDefaultNodeEnv(options, 'production'); | ||||||
| normalizeCommonOptions(options, 'preview'); | ||||||
|
|
||||||
| const packageName = '@rspack/dev-server'; | ||||||
| try { | ||||||
| require.resolve(packageName); | ||||||
| } catch { | ||||||
| const logger = cli.getLogger(); | ||||||
| logger.warn( | ||||||
|
||||||
| logger.warn( | |
| logger.error( |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -48,6 +48,17 @@ export class ServeCommand implements RspackCommand { | |||||
| normalizeCommonOptions(cliOptions, 'serve'); | ||||||
| cliOptions.hot = normalizeHotOption(cliOptions.hot); | ||||||
|
|
||||||
| const packageName = '@rspack/dev-server'; | ||||||
| try { | ||||||
| require.resolve(packageName); | ||||||
| } catch { | ||||||
| const logger = cli.getLogger(); | ||||||
| logger.warn( | ||||||
|
||||||
| logger.warn( | |
| logger.error( |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version constraint for webpack-bundle-analyzer in peerDependencies uses an exact version (4.10.2) which is overly restrictive. Consider using a more flexible version range like "^4.10.2" to allow users to use newer compatible versions without peer dependency warnings. This follows the pattern used for @rspack/core which uses "^1.0.0-alpha || ^1.x".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous contraint was fixed to
4.10.2, IMHO there is nothing to change here.