Relative Content

Tag Archive for typescriptnpmelectronpackage.json

Creating CJS/ESM package for Electron App

I’m creating a project that will need several seperated projects to fully work. I would like to keep my types consistent between projects. In this order i would like to create a special npm package for my usage (my-dto).
I need this package to be converted into both ESM and CJS types.
CJS versions seems to be working fine, i`m using it inside Nest.js and everything is compiling properly.
Problem is with ESM version. I need it to work inside Vite, Electron environment.
Once i’m trying to run Electron App i get an Error: