react-jsonschema-form
react-jsonschema-form copied to clipboard
make it compatible with native esm
Prerequisites
- [X] I have read the documentation
What theme are you using?
core
Is your feature request related to a problem? Please describe.
For vite SSR we get issues due to not natively supporting ESM. Please check advise from https://publint.dev/@rjsf/[email protected]
Describe the solution you'd like
Use type: module
or rename esm files with extension .mjs
Describe alternatives you've considered
No response
@veeramarni Are you sure you are importing the libraries correctly? We are using vite ourselves to run our playground and it works just fine. Our libraries export esm versions which I believe others are using. Can you provide the errors you are getting?
The issue happens when using SSR. Node 18 only support pure ESM as describe here
@veeramarni are you sure that you are importing the ESM versions of the RJSF repos? Again, we are using vite just fine with our repos.