mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
Update README.md
This commit is contained in:
parent
fa27fe245b
commit
c04d0ba667
1 changed files with 10 additions and 1 deletions
|
|
@ -58,6 +58,15 @@ that being said, this feature is optional and can be [disabled](https://github.c
|
|||
|
||||
# Release in CJS, ESM or both
|
||||
|
||||
Contrary to what other guides or project starters may suggest, you don't necessarily need Vite/rollup to bundle your library,
|
||||
nor do you need to fragment your modules into smaller, independently published units on NPM under the package/ directory for your module
|
||||
to be tree-shakable (e.g., `@your-module/submodule1`, `@your-module/submodule2`).
|
||||
|
||||
The reality is much simpler. The responsibility of bundling lies with the final application; your role involves merely
|
||||
publishing `.js` files and types declaration `.d.ts` files, which are the output of `tsc`.
|
||||
|
||||
And that's all there is to it!
|
||||
|
||||
## CJS only (default)
|
||||
|
||||
By default your module release [in CommonJS (CJS)](https://github.com/garronej/ts-ci/blob/8390339b52c98cdbd458d4b945286f999358a1ff/tsconfig.json#L3) with [ESM module interop](https://github.com/garronej/ts-ci/blob/8390339b52c98cdbd458d4b945286f999358a1ff/tsconfig.json#L6).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue