Describe the bug
Event configure this in vue.config.js , the dist entry files still have webextension-polyfill module code
chainWebpack: (config) => {
// adambullmer/vue-cli-plugin-browser-extension seems conflict with webextension-polyfill-ts
// And browser object will be undefined
// To support Typescript, Follow https://github.com/adambullmer/vue-cli-plugin-browser-extension#browser-polyfills to remove the webpack chain 'provide-webextension-polyfill'
config.plugins.delete('provide-webextension-polyfill')
config.module.rules.delete('provide-webextension-polyfill')
}
inject.js inject by content-script like this
document.addEventListener("DOMContentLoaded", function () {
var temp = document.createElement("script");
temp.setAttribute("type", "text/javascript");
temp.src = chrome.extension.getURL("js/inpage.js");
temp.onload = function () {
this.parentNode.removeChild(this);
};
document.body.appendChild(temp);
});
Expected behavior
Remove all webextesion-polyfill in dist entry file
Screenshots



| Name |
Version |
| vue-cli-plugin-browser-extension |
latest |
| Operating System |
mac |
| Node |
v16.13.0 |
| NPM/Yarn |
yarn 1.22.17 |
| vue-cli |
4.5.15 |
| vue-cli-service |
4.5.15 |
| browser |
chrome |
Describe the bug
Event configure this in vue.config.js , the dist entry files still have
webextension-polyfill module codeinject.jsinject by content-script like thisExpected behavior
Remove all webextesion-polyfill in dist entry file
Screenshots


