mubaidr / vite-vue3-browser-extension-v3

Another vite powered web extension (chrome, firefox, etc.) starter template.
481 stars 63 forks source link

Refused to load the script 'chrome-extension://073ecc0e-b837-4106-*/vendor/vite-client.js' #91

Closed qdrk closed 1 week ago

qdrk commented 1 week ago

Anyone seeing this error starting from yesterday?

Refused to load the script 'chrome-extension://073ecc0e-b837-4106-*/vendor/vite-client.js' because it violates the following Content Security Policy directive: "script-src 'self' 'wasm-unsafe-eval' 'inline-speculation-rules' http://localhost:* http://127.0.0.1:*".

This used to be working, not sure if this is a Chrome bug. I'm on Chrome "130.0.6723.59 (Official Build) (64-bit)"

qdrk commented 1 week ago

OK, after a few hours, finally found it: https://github.com/crxjs/chrome-extension-tools/issues/918

EPB1996 commented 1 week ago

OK, after a few hours, finally found it: crxjs/chrome-extension-tools#918

Thank you! Fix for dev:chrome Set "use_dynamic_url": false in /dist/chrome/manifest.json

In general, the problem occurs mainly in development. I did not encounter the problem when building. Nonetheless, the thread also provides a postbuild script that can be used as a hotfix for now to deactivate dynamic urls.