You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ship packages in multiple formats (CJS and ES) #20
I'd rather exclusively publish all constituent packages as pure ES modules
There's no straightforward way of building to multiple targets
tsup bundles the transpiled source code into one file per format (unless you start using custom outDir options for esbuild / provide glob-pattern entry points)
unbuild seems bugged in that it performs checks on declaration files on node_modules regardless of skipLibCheck
separate configs (tsconfig.esm.json, tsconfig.cjs.json and tsconfig.types.json) work, but compiling 3 times and maintaining so much configuration would be unfeasible given how little upside there is
Activity
driimus commentedon Dec 5, 2022
Might close this as won't do because:
tsupbundles the transpiled source code into one file per format (unless you start using customoutDiroptions for esbuild / provide glob-pattern entry points)unbuildseems bugged in that it performs checks on declaration files onnode_modulesregardless ofskipLibChecktsconfig.esm.json,tsconfig.cjs.jsonandtsconfig.types.json) work, but compiling 3 times and maintaining so much configuration would be unfeasible given how little upside there is