You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I'm using vue-cli-plugin-browser-extension, which in turn is using your reloader plugin.
That plugin also provides the webextension-polyfill. It does so by registering it as a webpack plugin and loader - which then can simply be deleted in the user's own webpack chaining.
It took me quite a while to figure out why the polyfill would still be inserted into my scripts - until I digged into the source code and found out that it's done by the webpack-extension-reloader, here.
This is frustrating, since I would like to use the webextension-polyfill directly and standalone, for 2 reasons:
I use 2 separate builds, one for FF, one for chrome. For FF I don't wish to include this polyfill, for obvious reasons.
For chrome I don't want to have the polyfill inserted into each and every script, but rather have it only once, standalone -> then I can simply insert it whereever needed (i.e. via manifest.json as a content script or as a background script, or via tabs.executeScript or via <script> of some extension page html.
I'd love to stick to the current usage of vue-cli-plugin-browser-extension (and therefore of webpack-extension-reloader as well), so it would be great if you could provide some feedback on wether/how I can avoid your polyfill insertions.
Thx a lot
Update:
It just dawned to me that the polyfill won't be included into a production build, since the webpack-extension-reloader is only used for development.
I can live with having the polyfill inserted into my scripts in development mode -> Will have to check if there are any unwanted side-effects when using my own polyfill implementation (i.e. only using it for prod).
The text was updated successfully, but these errors were encountered:
mclberlin
changed the title
Is there a way no disable the insertion of the webextension-polyfill into the scripts?
Is there a way to disable the insertion of the webextension-polyfill into the scripts?
Nov 18, 2022
Type:
I'm going to open a PR:
Description:
I'm using vue-cli-plugin-browser-extension, which in turn is using your reloader plugin.
That plugin also provides the webextension-polyfill. It does so by registering it as a webpack plugin and loader - which then can simply be deleted in the user's own webpack chaining.
It took me quite a while to figure out why the polyfill would still be inserted into my scripts - until I digged into the source code and found out that it's done by the webpack-extension-reloader, here.
This is frustrating, since I would like to use the webextension-polyfill directly and standalone, for 2 reasons:
tabs.executeScript
or via<script>
of some extension page html.I'd love to stick to the current usage of vue-cli-plugin-browser-extension (and therefore of webpack-extension-reloader as well), so it would be great if you could provide some feedback on wether/how I can avoid your polyfill insertions.
Thx a lot
Update:
It just dawned to me that the polyfill won't be included into a production build, since the webpack-extension-reloader is only used for development.
I can live with having the polyfill inserted into my scripts in development mode -> Will have to check if there are any unwanted side-effects when using my own polyfill implementation (i.e. only using it for prod).
The text was updated successfully, but these errors were encountered: