-
Notifications
You must be signed in to change notification settings - Fork 14
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
Webpack 5 support #49
Comments
I'm experiencing the same issue when combined with Simplified repro on webpack 5, modified const InjectPlugin = require('..').default;
module.exports = {
entry: './entry.js',
mode: 'development',
plugins: [
new InjectPlugin(() => `console.log('hello world');`),
new InjectPlugin(() => `console.log('second injected code');`)
],
module: {
rules: [
{
oneOf: [
{
exclude: [/webpack-inject/],
loader: require.resolve('file-loader'),
}
]
}
]
}
}; Seems like now its trying to use Will try to investigate a bit more, lmk if you have any ideas @adierkens 🙏 |
To support webpack 5 it'll also be necessary to account for the possibility of entry descriptor syntax - see https://webpack.js.org/configuration/entry-context/#entry-descriptor. Cheers! |
Looks like someone has done some work on Webpack5 support already: https://github.com/bpnetguy/webpack-inject-plugin |
I also need this plugin in webpack5, so I have to implement a version myself, Code injection can be performed by scopes ["entry", "remoteEntry", "exposesEntry"] |
Trying to upgrade a repo to use webpack 5 but I keep getting this:
The text was updated successfully, but these errors were encountered: