1

I cannot succeed in including Vue 3 in a simple Chrome extension. I created a local folder within the extension with the following structure and content

but I always get the following error message when I try to lead the library from any extension's pages:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem:". Either the 'unsafe-inline' keyword, a hash ('sha256-NEG1aW1******'), or a nonce ('nonce-...') is required to enable inline execution.

I don't understand the issue. Any other library that I bundle directly inside the extension has always worked just fine, but this is not happening with Vue. Does anyone have any idea? Thanks!

  • Sounds like [Are we forced to use 'unsafe-inline' in our CSP when using Vue.JS?](https://stackoverflow.com/q/58397934) – wOxxOm Jun 20 '21 at 14:36
  • Yes but the point is that inline JS is not allowed in Chrome since v.45 and any different statement in the manifest is simply ignored...I don't understand how to include Vue into an extension page (having Vue served from the extension directly and not from a CDN) it should be possible but it's driving me crazy :/ – Mauro Gobbi Jun 20 '21 at 16:48
  • The topic I've linked says you can compile Vue using `--no-unsafe-inline`. – wOxxOm Jun 20 '21 at 16:52

0 Answers0