Hi @josdejong, I noticed an issue when attempting to import lossless-json into a commonjs module, a TS1479 error is raised (The current file is a CommonJS module ... the referenced file is an ECMAScript module ...).
A minimal repo that can reproduce the issue can be found here. Running npm run build && npm start should log twice, once for the cjs and once for the esm build, instead the mentioned error occurs.
This PR restructures the published module types by moving the esm type from the root of the library to the esm subfolder.
Hi @josdejong, I noticed an issue when attempting to import
lossless-json
into a commonjs module, a TS1479 error is raised (The current file is a CommonJS module ... the referenced file is an ECMAScript module ...).A minimal repo that can reproduce the issue can be found here. Running
npm run build && npm start
should log twice, once for the cjs and once for the esm build, instead the mentioned error occurs.This PR restructures the published module types by moving the esm type from the root of the library to the esm subfolder.