Open rendomnet opened 2 weeks ago
Using other extensions within your popup window is not allowed because it would imply that an extension, which is a standalone bundle, shares a direct connection with another extension, posing a severe security risk. This is due to Chrome's strict Content Security Policy (CSP) restrictions, not an issue with this repository.
Download and Build Standalone Vue Devtools:
installation.md
to generate a standalone Electron app for Vue Devtools.<script src="http://localhost:8098"></script>
to the head of your HTML file.Update Your Manifest JSON:
"host_permissions": [
"http://localhost/*",
],
"content_security_policy": {
"extension_pages": "script-src 'self' http://localhost:8098; object-src 'self'"
}
The eval
Issue:
'unsafe-eval'
to your CSP:
"extension_pages": "script-src 'self' 'unsafe-eval' http://localhost:8098; object-src 'self'"
Chrome's extension security policy (especially in Manifest V3) typically disallows unsafe-eval
. Vue Devtools uses eval
internally, which will likely lead to issues if you try to run it within a Chrome extension.
While there are workarounds, developing and debugging your Vue.js application outside the Chrome extension environment is often the most effective approach. This ensures that you can use tools like Vue Devtools without running into CSP-related issues.
@MishaYanov Manifest v3 prohibits the use of unsafe-eval
, rendering the primary method you provided ineffective. It will only confuse another developers that will visit this page.
My solution was working up until the last update - you could try to update the patch provided. You can find the solution, explanation, code, patch in the readme https://github.com/Toumash/crxjs-vite-plugin-react-devtools
It has one flaw - HMR does not work with it
Build tool
Vite
Where do you see the problem?
Describe the bug
I'm using Vite-CRX with Vue and can't find a way to connect Vue DevTools to my extension. Is there any solution or documentation available for this?
Reproduction
1
Logs
System Info
Severity
annoyance