Closed bosaengineering closed 4 years ago
This appears to be because one of your dependencies uses eval
which, in a production extension isn't allowed.
https://github.com/s-yadav/jsonQ/blob/master/jsonQ.js#L893
@adambullmer ah makes sense. Thank you so much. I was able to replace that with a custom function.
Describe the bug using Kocal/vue-web-extension
After building the production version of my extension, I attempted to load it unpacked. When I do this, I get the following error:
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'".
It points to the following lines in the code:
File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 61 col 13631 in [anonymous] File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 61 col 13928 in Object.a40a File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 1 col 110 in n File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 1264 col 2266 in Module. File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 1264 col 7114 in Module.fe77 File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 1 col 110 in n File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 1 col 3194 in Object.1 File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 1 col 110 in n File chrome-extension://lkpjgcmldikmmafidjhfbiagckdjbfij/js/background.js line 1 col 908 in [anonymous]
When I load the development code (created by npm serve) I do not get this error.
I have a suspicion that it could be related to using Vue in development vs production Vue but I can't confirm.
To Reproduce
Expected behavior
Screenshots
Reproducible Example If possible, add a link to a repository/branch where the issue is currently happening.
Additional context