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

Does rspack normalModuleLoader plan to align beforeLoaders and other hooks with webpack 5? #8055

Open
gaoachao opened this issue Oct 5, 2024 · 0 comments

Comments

@gaoachao
Copy link
Contributor

gaoachao commented Oct 5, 2024

Current

webpack NormalModuleCompilationHooks:

Image

rspack js side NormalModuleHooks:

Image

My Confusion

In addition, I found some code about before_loaders on the rust side, but the definition here is a litter different from webpack. Does it only need to be exported on the js side before it can be used? Please forgive me if my understanding is wrong.
Image

Background

My webpack project use this hooks to add some custom loader context.

compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
    NormalModule.getCompilationHooks(compilation).beforeLoaders.tap(PLUGIN_NAME, (loaders, mod) => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant