vue-cli-plugin-browser-extension
vue-cli-plugin-browser-extension copied to clipboard
Webpack 5 support?
Does the plugin support Webpack 5 which will be the default in Vue CLI 5?
Adding the plugin in a new Vue CLI 5 project (with TypeScript) generates the following error:
ERROR TypeError: Cannot read property 'ignore' of undefined
TypeError: Cannot read property 'ignore' of undefined
at /Users/x/test_app/node_modules/vue-cli-plugin-browser-extension/index.js:129:20
at Object.tap (/Users/x/test_app/node_modules/webpack-chain/src/Plugin.js:30:24)
at /Users/x/test_app/node_modules/vue-cli-plugin-browser-extension/index.js:128:36
at /Users/x/test_app/node_modules/@vue/cli-service/lib/Service.js:266:40
at Array.forEach (<anonymous>)
at Service.resolveChainableWebpackConfig (/Users/x/test_app/node_modules/@vue/cli-service/lib/Service.js:266:26)
at PluginAPI.resolveChainableWebpackConfig (/Users/x/test_app/node_modules/@vue/cli-service/lib/PluginAPI.js:145:25)
at module.exports (/Users/x/test_app/node_modules/@vue/cli-service/lib/commands/build/resolveAppConfig.js:9:22)
at build (/Users/x/test_app/node_modules/@vue/cli-service/lib/commands/build/index.js:147:50)
at /Users/x/test_app/node_modules/@vue/cli-service/lib/commands/build/index.js:69:13
at Service.run (/Users/x/test_app/node_modules/@vue/cli-service/lib/Service.js:260:12)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: `vue-cli-service build --mode development --watch`
npm ERR! Exit status 1
npm ERR!
I also want this feature, Vue CLI 5 is in RC status now, and It is time to update this repo.
In my test, this TypeError
is because of copy-webpack-plugin
, as they change the args structure.
However, not only this dependency is old, the webpack-extension-reloader
dependency is also not support for webpack, and should change it to https://github.com/SimplifyJobs/webpack-ext-reloader.
More the dependency webextension-polyfill
is also old to use , and can be update to 0.8.0
~~I found a fork https://github.com/mikelxk/vue-cli-plugin-browser-extension which support webpack 5 !!!!~~ (see below comment )
I fork this project and did some work to make it support webpack 5, You can Visit https://github.com/Rhilip/vue-cli-plugin-browser-extension/commit/7e19baf87a1addda8c8445bd9fad62602af9fc41 to see more detail, Since mikelxk/vue-cli-plugin-browser-extension lost a dependency and a very import work in new vue-cli 5.x is not done in this project.
Change package.json to "vue-cli-plugin-browser-extension": "Rhilip/vue-cli-plugin-browser-extension",
, My full merge commit is like https://github.com/ronggang/PT-Plugin-Plus/commit/5b94715941e6d64c5102549635098a6310f784fa
Update at 2022.12.17:
- Repo: https://github.com/pt-plugins/vue-cli-plugin-browser-extension , Please See full README.md
- I publish my fork to npm, so everyone can replace with new
"vue-cli-plugin-browser-extension": "npm:@rhilip/vue-cli-plugin-browser-extension@^0.27.0",
- ~my fork is not support MV3, though issue #107 and pull #131 provide a patch for this vue-cli extension. There still some deep dependencies not support MV3, like SimplifyJobs/webpack-ext-reloader (see https://github.com/SimplifyJobs/webpack-ext-reloader/issues/28 )~
Manifest v3 support is there already : https://github.com/SimplifyJobs/webpack-ext-reloader/issues/28
Manifest v3 support is there already : SimplifyJobs/webpack-ext-reloader#28
I see this issue and connected pr, however no merge and release. Since SimplifyJobs/webpack-ext-reloader lack maintenance, I may want to remove this deps or replace it to another.
https://github.com/SimplifyJobs/webpack-ext-reloader is now upgraded to MV3 Please release a compatible version