The following structure ensures packages work optimally with our monorepo/Nx workflow.
./package.json
"type": "module"
to set the default resolution of .js
files to ESM; this does not have any impact on building for CJS"exports"
field"main"
, "module"
, and "types"
fields"test:eslint"
, "test:types"
, "test:lib"
, "build"
, "test:build"
./tsconfig.json
"extends": "../../tsconfig.json"
)./vite.config.ts
./src
./tests
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.