vue-cli-plugin-browser-extension
vue-cli-plugin-browser-extension copied to clipboard
fix(csp): define global as 'window' to prevent CSP issues
Hey :wave:
@t-miller faced an issue on https://github.com/Kocal/vue-web-extension/issues/658, with the usage of Function() and eval() in the dist code, complying with Mozilla' CSP when uploading the extension on their web store.
I fixed the same issue in a previous version of my preset (see https://github.com/Kocal/vue-web-extension/pull/398), and so I'm applying it here to impact more people.
I used .tap() to update DefinePlugin arguments, which is always configured by Vue-CLI.
Here is the output of vue-cli-service inspect:
