Releases: cabify/package-build-javascript
Releases · cabify/package-build-javascript
v0.2.1-beta.0
Release Notes - v0.2.1-beta.0
🚀 New Features
Tree Shaking Support (--preserve-modules)
New CLI flag that enables Rollup's preserveModules mode, generating individual files instead of a single monolithic bundle.
package-build -m
package-build --preserve-modulesBenefits:
- Enables effective tree-shaking for consumers
- Reduces bundle size significantly for libraries with many exports (e.g., icon libraries)
- Preserves source directory structure in output
Output structure:
dist/ # CJS modules
es2015/ # ESM modules
📦 Recommended Configuration
For tree-shakable libraries, add to your package.json:
{
"sideEffects": false,
"exports": {
".": {
"import": "./es2015/index.js",
"require": "./dist/index.js"
}
}
}v0.1.2-beta.1
0.1.2-beta.1
0.1.2-beta.0
Changed
- Use typescript 5.
0.1.1
0.1.0
Added
- Allow defining typescript project with
-pparameter to define a differenttsconfig.tsfile. p.eg:package-build -p tsconfig.build.json. This is useful to have atsconfig.jsonin the root to allow IDE and library implementation to get a project file including files even if they won't be included in the NPM package (.spec, .test, .stories). Otherwise, a project including these files will transform every file defined, even those not desired in the final bundle, not only forcing to exclude them explicitly but increasing compilation times and errors. By defaulttsconfig.jsonwill be used as it usually does.
0.0.3-beta.2
v0.0.3-beta.2 0.0.3-beta.2
v0.0.3-beta.0
Fixed
- Type definition generation errors now stop the package compilation process.