react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

make it compatible with native esm

Open veeramarni opened this issue 11 months ago • 3 comments

Prerequisites

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 avatar Mar 09 '24 00:03 veeramarni

@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?

heath-freenome avatar Mar 15 '24 19:03 heath-freenome

The issue happens when using SSR. Node 18 only support pure ESM as describe here

veeramarni avatar Mar 16 '24 12:03 veeramarni

@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.

heath-freenome avatar Mar 21 '24 17:03 heath-freenome