Vue Devtools

176 views
Skip to first unread message

David Vallejo

unread,
Mar 30, 2022, 8:56:36 PM3/30/22
to Chromium Extensions
I've started (forcely ... )to migrate some of my extensions to MV3 and some of them use are built using Vue. But I'm not able in any way to use the vue-devtools because it relies on eval for working


"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'". "

This is only being used for development, is there any way to allow the unsafe eval, maybe if an extension is loaded in dev mode, or maybe whilelisting the unsafe-evals for assets loaded from "localhost", I was using the following for MV2

"DEV: content_security_policy": "script-src 'self' http://localhost:8098 'unsafe-eval'; object-src 'self'",

wOxxOm

unread,
Mar 31, 2022, 10:33:30 AM3/31/22
to Chromium Extensions, thyn...@gmail.com
MV3 doesn't allow relaxing CSP. You can try to write a polyfill for `eval` based on the workaround shown in https://crbug.com/1239976
Reply all
Reply to author
Forward
0 new messages