Description
Problem Description
I am using Vite as a bundler. Vite expects ES Module by default. CommonJS Format is automatically transformed to ES Module during development builds. But somehow I can't get it working with formiojs for production builds. It results in exports is not defined
Error:
. I guess this error originates in Vite not being able to convert formiojs from CommonJS to ES Module during production build. Therefore it still contains exports/require after bundling.
Currently formiojs only supports CommonJS as output format. When are gonna support ES Module output format?
Possible Solution
In addition to CommonJS format, also support ES Module format. So Vite could directly use this version instead of having to do the conversion by itself.