Open tvrONHzhIEUz opened 2 years ago
@tvrONHzhIEUz Just now I stumbled upon the same issue. Did some digging and found out that even if you remove the plugin and loader registrations from the source code (node_modules/vue-cli-plugin-browser-extension/index.js) the polyfill will still be inserted into the scripts. Some more digging revealed that the polyfill is being inserted by the webpack-extension-reloader*, which is used by vue-cli-plugin-browser-extension under the hood.
The extension-reloader is doing that w/o providing any options for disabling it :/ I will post an issue on its github page.
*Here is where they insert the polyfill.
Update: Here the issue, filed on the github repo page of the webpack-extension-reloader plugin
Update: Cited plugin webpack-extension-loader is for development mode only. So, having deleted** the plugin and loader from vue-cli-plugin-browser-extension the polyfill should only ever be inserted while being in development mode - which seems fine with me.
**
config.plugins.delete('provide-webextension-polyfill');
config.module.rules.delete('provide-webextension-polyfill');
Describe the bug Event configure this in vue.config.js , the dist entry files still have
webextension-polyfill module code
inject.js
inject by content-script like thisExpected behavior Remove all webextesion-polyfill in dist entry file
Screenshots