You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// a plugin in jsconstplugin={apply(compiler){constname='plugin-xx';compiler.hooks.compilation.tap(name,(compilation)=>{compilation.hooks.optimizeChunkModules.tap(name,()=>{console.log('optimizeChunkModules called');})console.log('optimizeChunkModules taps:',compilation.hooks.optimizeChunkModules.taps.filter(tap=>tap.name===name).length);})}}
Steps
Run serve mode
See once optimizeChunkModules called following optimizeChunkModules taps: 1
Modify source codes like src/index.js
See double optimizeChunkModules called following optimizeChunkModules taps: 2
Modify source codes like src/index.js
See triple optimizeChunkModules called following optimizeChunkModules taps: 3
Expected
Always see once optimizeChunkModules called following optimizeChunkModules taps: 1 after every source change.
More
I use compiler.hooks.compilation and compilation.hooks.optimizeChunkModules just for instance - seems that this issue applies to not only these hooks.
The text was updated successfully, but these errors were encountered:
System Info
Also produced with:
Not produced with:
Details
Reproduce link
https://github.com/xc2/rspack-hooks-repro
Reproduce Steps
Steps
optimizeChunkModules called
followingoptimizeChunkModules taps: 1
src/index.js
optimizeChunkModules called
followingoptimizeChunkModules taps: 2
src/index.js
optimizeChunkModules called
followingoptimizeChunkModules taps: 3
Expected
optimizeChunkModules called
followingoptimizeChunkModules taps: 1
after every source change.More
I use
compiler.hooks.compilation
andcompilation.hooks.optimizeChunkModules
just for instance - seems that this issue applies to not only these hooks.The text was updated successfully, but these errors were encountered: