3.0.0-beta.6
vue create testapp
productionSourceMap: false
in vue.config.js. Content-Security-Policy-report-only "default-src 'none'; script-src 'self'; img-src 'self' data:; style-src 'self' ";
according to the Vuejs doc there should be no problem
The page return an error
[Report Only] Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-aMW8RJ8d9m3crvBSAvcz8B/pG hlL4Sa2UuvzcOXfAE='), or a nonce ('nonce-...') is required to enable inline execution.
Do you have an idea to get around this?
This is because we are inlining the webpack manifest chunk by default to reduce HTTP requests.
You can use the following to disable the inlining:
// vue.config.js
module.exports = {
chainWebpack: config => {
config.plugins
.delete('split-manifest')
.delete('inline-manifest')
}
}
@yyx990803 could you add this somewhere in the docs as it was really a pain to find an answer to this issue.
Most helpful comment
@yyx990803 could you add this somewhere in the docs as it was really a pain to find an answer to this issue.