antfu-collective/vitesse-webext

The options page will display an error after using vue-i18n

kunbo233 opened this issue · 3 comments

Describe the bug

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' http://localhost:3305".

at new Function (<anonymous>)
at compileToFunction (core-base.cjs.js:830:21)
at compileMessageFormat (core-base.cjs.js:1078:17)
at translate (core-base.cjs.js:927:11)
at vue-i18n.cjs.js:525:48
at wrapWithDeps (vue-i18n.cjs.js:476:23)
at t (vue-i18n.cjs.js:525:16)
at App.vue:40:19
at runtime-core.esm-bundler.js:2757:40
at callWithErrorHandling (runtime-core.esm-bundler.js:173:22)

cant not working?

Reproduction

vue- i18n

System Info

System:
    OS: macOS 11.7.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
    Memory: 578.85 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 18.15.0 - /usr/local/bin/node
    Yarn: 1.19.1 - ~/.yarn/bin/yarn
    npm: 6.14.8 - ~/.config/yarn/global/node_modules/.bin/npm
  Browsers:
    Chrome: 113.0.5672.92
    Edge: 113.0.1774.35
    Firefox: 113.0.1
    Safari: 15.4

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

@jiangkunbo0928 Use the @intlify/unplugin-vue-i18n plugin can resolve problem.

@jiangkunbo0928 Use the @intlify/unplugin-vue-i18n plugin can resolve problem.

thanks bro, save my day

tmkx commented

seems resolved, reopen if not :)