Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] 'unsafe-eval' in chrome extension V3 is denied #56

Open
Guovin opened this issue Jan 30, 2024 · 1 comment
Open

[Bug report] 'unsafe-eval' in chrome extension V3 is denied #56

Guovin opened this issue Jan 30, 2024 · 1 comment

Comments

@Guovin
Copy link

Guovin commented Jan 30, 2024

Description

When i use vue-template in v3 chrome extension, 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'".
Because v3 is denied eval completely.
I find maybe is use h function cause it:
h({
components: props.vueTemplateComponents,
setup: () => props.vueTemplateData,
template: <${props.tag}>${outputHtml.value}</${props.tag}>,
})
Is there any way to solve this problem?

Reproduction

no

Used Package Manager

pnpm

System Info

System:
    OS: Windows 11 10.0.22621
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700
    Memory: 9.19 GB / 31.78 GB
Binaries:
    Node: 19.8.1 - D:\nvm\nodejs\node.EXE
    npm: 9.5.1 - D:\nvm\nodejs\npm.CMD
    pnpm: 8.6.11 - ~\AppData\Local\pnpm\pnpm.CMD
Browsers:
    Edge: Spartan (44.22621.1992.0), Chromium (121.0.2277.83)
    Internet Explorer: 11.0.22621.1
npmPackages:
    vue: ^3.3.11 => 3.3.11
    vue-showdown: ^4.2.0 => 4.2.0
@meteorlxy
Copy link
Owner

Sorry for delay. You may check out resources about Content Security Policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants