LoginSignup
19

More than 5 years have passed since last update.

ChromeAppとかExtensionsでVue.jsを使うために

Last updated at Posted at 2014-07-18

セキュリティのため普通にVue.jsを読み込んで v-on="click:... とか使おうと思うと。

Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback

と言った感じに怒られるので。

manifest.jsonにsandboxを追加してあげます。

manifest.json
{
  "manifest_version":2,
  ...

  "sandbox":{
    "pages":[
      "index.html"
    ]
  },

  ...
}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19