The module property in package.json must point to an ESM (ECMAScript Module) file.
As a result, this library encounters issues during Vite production builds. Specifically, Vite misinterprets CJS (CommonJS) files as ESM, causing problems with handling the require function.
# The app does not start with the following error
react-editor-js.js:3 Uncaught ReferenceError: require is not defined
at createReactEditorJS (react-editor-js.js:3:27)
PR Type
Description
The module property in package.json must point to an ESM (ECMAScript Module) file.
As a result, this library encounters issues during Vite production builds. Specifically, Vite misinterprets CJS (CommonJS) files as ESM, causing problems with handling the require function.