Update README.md

This commit is contained in:
Joseph Garrone 2023-05-28 14:15:54 +02:00 committed by GitHub
parent fa27fe245b
commit c04d0ba667
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,16 @@ https://user-images.githubusercontent.com/6702424/197344513-065246b9-8823-4894-a
- ⚙️ ESlint and Prettier are automatically triggered against files staged for commit. Despite what [t3dotgg](https://github.com/t3dotgg) says, it's the correct way of doing it,
that being said, this feature is optional and can be [disabled](https://github.com/garronej/ts-ci/blob/8da207622e51a248542cf013707198cd7cad1d09/README.md?plain=1#L87-L91) if desired.
# Release in CJS, ESM or both
# 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)