GoogleChromeLabs / worker-plugin

👩‍🏭 Adds native Web Worker bundling support to Webpack.
https://npm.im/worker-plugin
Apache License 2.0
1.91k stars 79 forks source link

parser.state.module.addPresentationalDependency is not a function #102

Open JGrimbert opened 3 years ago

JGrimbert commented 3 years ago

Using vue (2.6.12) with webpack (5.32.0), when using workerPlugin, I get this error:

Module parse failed: parser.state.module.addPresentationalDependency is not a function
File was processed with these loaders:
 * ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js
 * ./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib/index.js
 * ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js
You may need an additional loader to handle the result of these loaders.

It comes from JavascriptParserHelpers in webpack/lib/javascript ..

I will try to dig in but it's a first time approch for me on webpack

kostyay commented 3 years ago

Did you end up finding a solution? I have the same problem with vuejs

vseverestek commented 2 years ago

I found that webpack was installed as a project on global level. Removing that fixed the issue for me. I hope that helps.

matictrebusak commented 2 years ago

vseverestek Yes this helps. Thank you.