Description
Prerequisites
- I have read the documentation
What theme are you using?
shadcn
What is your question?
Hi! Thanks for the recent updates—support for shadcn
is awesome! 😊
I'm building a Chrome extension and running into the following error:
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'".
From what I understand, based on the docs, I need to precompile my schema to avoid eval
. However, the example there seems outdated.
First, it shows a TypeScript error indicating it needs more arguments than what's shown in the documentation:

Even if I pass JSONSchema
that I used to generate precompiledValidator
it throws following error in the browsers console.

Am I doing something the wrong way or is it not supported yet in the 6.0.0-beta.7 version?
Here's a part my package.json
"dependencies": {
...
"@rjsf/core": "6.0.0-beta.7",
"@rjsf/shadcn": "6.0.0-beta.7",
"@rjsf/utils": "6.0.0-beta.7",
"@rjsf/validator-ajv8": "6.0.0-beta.7",
...
},