Issue with webworkify and Webpack 5
amosbyon1224 opened this issue · 1 comments
amosbyon1224 commented
Hello!
I'm running into some issues with using webworkify with a project I'm upgrading to Webpack 5.
I've created a minimum reproducible project here:
https://github.com/amosbyon1224/webworkify-webpack5
I'm getting an error that arguments
is undefined from here:
https://github.com/browserify/webworkify/blob/master/index.js#L1
This was working fine as of webpack 4.27.1 but does not seem to work as of Webpack 5.6.0
legubiao commented
Hello, I also met this problem and I fixed it by moved three vars into the module.exports like this:
- before:
var bundleFn = arguments[3];
var sources = arguments[4];
var cache = arguments[5];
module.exports = function (fn, options) {
...
}
- after:
module.exports = function (fn, options) {
var bundleFn = arguments[3];
var sources = arguments[4];
var cache = arguments[5];
...
}
it works fine in my quasar V2 / vue3 project which use WebPack5 and roslib.js