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

Webpack compatible builtins should also be available via new rspack.XXXPlugin() #3740

Closed
h-a-n-a opened this issue Jul 10, 2023 · 5 comments
Closed
Labels
breaking change feat New feature or request team The issue/pr is created by the member of Rspack. to be discussed Rspack team would discuss these issues per week

Comments

@h-a-n-a
Copy link
Collaborator

h-a-n-a commented Jul 10, 2023

What problem does this feature solve?

This blocked some tests in Rspack. https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/test/configCases/loaders/hot-in-context/webpack.config.js

What does the proposed API of configuration look like?

Make every webpack compatible builtins to be registered using plugins: [new rspack.xxxPlugin()].

@h-a-n-a h-a-n-a added feat New feature or request breaking change labels Jul 10, 2023
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Jul 10, 2023
@h-a-n-a
Copy link
Collaborator Author

h-a-n-a commented Jul 10, 2023

This can be introduced in a progressive way.

  1. On the top of builtins, we add support for plugin style and at the same time, deprecating the builtins options
  2. Fully support for plugin style

@h-a-n-a h-a-n-a added the to be discussed Rspack team would discuss these issues per week label Jul 10, 2023
@ScriptedAlchemy
Copy link
Contributor

We should throw deprecation warnings for builtins before removing it completely so users have a chance to adopt before build fails.

@9aoy
Copy link
Collaborator

9aoy commented Aug 14, 2023

I am more concerned about how rspack will set the minimizer behavior. Built-in minimizer is a default value in webpack, and only override is supported, and experiments.css does not yet support built-in compression (webpack/webpack#14893).

20230814-115330

ps. In our scenario(modern.js), we want to continue using rspack's built-in js minimizer, but replace css minimizer with cssnano.

@9aoy
Copy link
Collaborator

9aoy commented Aug 14, 2023

It seems that the webpack experiment css is supporting minimize, but I am more concerned about whether I can use the built-in js compression and custom css compression at the same time. 😂

webpack/webpack#17309

@h-a-n-a
Copy link
Collaborator Author

h-a-n-a commented Sep 4, 2023

closed in favor of this #4006

@h-a-n-a h-a-n-a closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change feat New feature or request team The issue/pr is created by the member of Rspack. to be discussed Rspack team would discuss these issues per week
Projects
None yet
Development

No branches or pull requests

3 participants