Closed realrecordzLab closed 4 years ago
it seems like you can but replaces the unsafe-eval https://github.com/adambullmer/vue-cli-plugin-browser-extension/blob/master/lib/manifest.js#L37
I've faced same problem:Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
I've tried to add "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
in manifest.json and rebuild it, but problem remains.
Unsafe eval isn't allowed in extensions in the chrome/mozilla stores, so this plugin actively replaces them in production builds. If you are distributing yourself you can continue to use dev builds, or manually update the manifest in the resulting archive.
Is possible to set the CSP for the extension when is build with a custom configuration?