Open breezewish opened 4 years ago
I'm also investigating this. I just forked the project.
So far I just changed
Find original: new webpack.HashedModuleIdsPlugin(this.hashedModuleIds || { Replace with: new webpack.ids.HashedModuleIdsPlugin(this.hashedModuleIds || {
The next problem I'm having is when index.js imports an extended plugin - ExternalModuleFactoryOverridePlugin.js
// use root external
const ExternalsOverridePlugin = require('./ExternalsOverridePlugin')
new ExternalsOverridePlugin(options).apply(compiler)
// inject amd modules
compiler.hooks.thisCompilation.tap('AmdWebpackPlugin', compilation => {
Error: TypeError: Cannot read properties of undefined (reading 'hooks')
ExternalModuleFactoryOverridePlugin.js
- compiler.hooks.normalModuleFactory - Does not exist
apply (compiler) { const globalType = this.type console.log('ExternalModuleFactor - compiler.hooks = ', compiler.hooks) compiler.hooks.normalModuleFactory.tap(
Not sure why, but maybe its to do with a plugin loading another plugin.
Thanks for the project! I tried to use this plugin in Webpack 5 using the example in the README, but unfortunately it doesn't work with the following error message:
It looks to be fine in Webpack 4 though, without changing anything :)