rspack
rspack copied to clipboard
[Feature]: Support renderModuleContent and other hooks of JavascriptModulesPlugin
What problem does this feature solve?
Currently there is only support for the chunkHash hook when calling the static method getCompilationHooks of JavascriptModulesPlugin. There are many more hooks available in the Webpack API in order to manipulate the modules as they are wrapped and chunked. I do not think there is any other way to do this.
For example, my plugin transform-async-modules-webpack-plugin cannot be Rspack compatible because it uses the renderModuleContent tap.
What does the proposed API of configuration look like?
Here's the full list of hooks:
https://github.com/webpack/webpack/blob/8a04c64e5e8e1b7ed1fd4b942a3d277296f14ef9/lib/javascript/JavascriptModulesPlugin.js#L175-L190