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

Add @rspack/core to the peer dependencies of html-webpack-plugin and react-refresh-webpack-plugin #4537

Closed
chenjiahan opened this issue Nov 6, 2023 · 2 comments · Fixed by #4807
Labels
feat New feature or request rsbuild rsbuild related team The issue/pr is created by the member of Rspack.

Comments

@chenjiahan
Copy link
Member

What problem does this feature solve?

Can we add @rspack/core to the peer dependencies of html-webpack-plugin and react-refresh-webpack-plugin (and more popular webpack plugins), then make webpack as an optional dependency?

The benifits:

  • Users do not need to install webpack as a dependency.
  • No peer dependency missing warning.

What does the proposed API of configuration look like?

{
  "peerDependencies": {
    "@rspack/core": ">=0.3.0",
    "webpack": ">=4.43.0 <6.0.0",
  },
  "peerDependenciesMeta": {
    "webpack": {
      "optional": true
    },
   "@rspack/core": {
      "optional": true
    }
  },
}
@chenjiahan chenjiahan added feat New feature or request pending triage The issue/PR is currently untouched. labels Nov 6, 2023
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 6, 2023
@chenjiahan chenjiahan added the rsbuild rsbuild related label Nov 6, 2023
@hardfist
Copy link
Contributor

hardfist commented Nov 6, 2023

yes, I already did this to webpack/webpack-dev-server#4778

@chenjiahan
Copy link
Member Author

Update: using forked html-rspack-plugin instead of html-webpack-plugin

https://github.com/rspack-contrib/html-rspack-plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request rsbuild rsbuild related team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants