modify-source-webpack-plugin
modify-source-webpack-plugin copied to clipboard
Incompatibility with webpack v >= 5.66.0
[DEP_WEBPACK_COMPILATION_NORMAL_MODULE_LOADER_HOOK] DeprecationWarning: Compilation.hooks.normalModuleLoader was moved to NormalModule.getCompilationHooks(compilation).loader (Use
node --trace-deprecation ...` to show where the warning was created)
c:\sources\xxx\node_modules\webpack\lib\NormalModule.js:207
throw new TypeError(
^
TypeError: The 'compilation' argument must be an instance of Compilation
at Function.getCompilationHooks (c:\sources\xxx\node_modules\webpack\lib\NormalModule.js:207:10)
at c:\sources\xxx\node_modules\modify-source-webpack-plugin\build\ModifySourcePlugin.js:80:40
at Hook.eval [as call] (eval at create (c:\sources\xxx\node_modules\tapable\lib\HookCodeFactory.js:19:10),
I have found that this error occurred because of having different "webpack" versions installed in 2 places:
c:\sources\xxx\node_modules\webpack c:\sources\xxx\node_modules@angular-devkit\build-angular\node_modules\webpack
Hi! Thank you for reporting this. I'll try to reproduce it later but it's would be good if you will you provide the minimal reproduction example.
Wasn't able to reproduce it from my side. So, if it's still relevant please provide more information and reopen