Open wereHamster opened 3 years ago
When react-inspector is used a web page which uses strict CSP setting (doesn't allow unsafe-eval), it crashes.
It's because the dist build (not only the cjs version but even the es version!) uses Function() to create and execute dynamic code. See line 744 in https://unpkg.com/browse/react-inspector@5.1.1/dist/es/react-inspector.js.
Function()
The dist build uses modern syntax and language features and leaves downcompiling to the user.
Describe the bug
When react-inspector is used a web page which uses strict CSP setting (doesn't allow unsafe-eval), it crashes.
It's because the dist build (not only the cjs version but even the es version!) uses
Function()
to create and execute dynamic code. See line 744 in https://unpkg.com/browse/react-inspector@5.1.1/dist/es/react-inspector.js.Expected behavior
The dist build uses modern syntax and language features and leaves downcompiling to the user.
Screenshots and/or logs