Create-react-app: Latest create-react-app doesn't let you build chrome extensions

Created on 24 Nov 2018  路  1Comment  路  Source: facebook/create-react-app

With the new create-react-app the index.html in the build folder have an inline script.

Problems:

Not able to build Chrome extensions using create-react-app. Chrome blocks the execution of the inline scripts with the following message:

Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-GgRxrVOKNdB4LrRsVPDSbzvfdV4UqglmviH9GoBJ5jk='), or a nonce ('nonce-...') is required to enable inline execution.

Is there any way around this?

Most helpful comment

Put INLINE_RUNTIME_CHUNK=false to your .env files

>All comments

Put INLINE_RUNTIME_CHUNK=false to your .env files

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Evan-GK picture Evan-GK  路  3Comments

rdamian3 picture rdamian3  路  3Comments

DaveLindberg picture DaveLindberg  路  3Comments

adrice727 picture adrice727  路  3Comments

xgqfrms-GitHub picture xgqfrms-GitHub  路  3Comments