2

I am developing a Chrome Extension based on manifest v3 and can't get React dev tools to work.

Here is what I did:

  1. yarn add -D react-devtools
  2. Add script tag to page of extension:
  <script src="http://localhost:8097"></script>
  1. Add content security policy to the manifest file:
 "content_security_policy": {
    "extension_pages": "script-src 'self'; object-src 'self'; script-src-elem 'self'; unsafe-inline 'localhost';"
}

Error I am getting:

Refused to load the script 'http://localhost:8097/' because it violates the following Content Security Policy directive: "script-src-elem 'self'".

I have tried all kinds of variations in unsafe-inline and nothing seems to work.

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
siva
  • 1,183
  • 3
  • 12
  • 28
  • Your script-src-elem is invalid. Try `script-src-elem 'self' 'unsafe-inline' http://localhost` – wOxxOm Feb 10 '22 at 20:13

0 Answers0