meteorlxy / vue-showdown

:page_with_curl: Use showdown as a vue component
https://vue-showdown.js.org
MIT License
129 stars 23 forks source link

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

Open Guovin opened 8 months ago

Guovin commented 8 months ago

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 commented 6 months ago

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