javascript - propblem using react js in Chrome extension -


i following tutorial build new tab chrome extension .. https://facebook.github.io/react/docs/tutorial.html

but when attach

<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> 

for rendering jsx using babel suggested tutorial error browser console.

"browser.min.js:4 uncaught evalerror: refused evaluate string javascript because 'unsafe-eval' not allowed source of script in following content security policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:"." screenshot of error

i know violating csp directive again how can use latest reactjs using babel ?

in manifest.json file, can try setting

"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" 

i got answer here. got rid of error me, i'm not knowledgeable enough know other implications, sorry.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -