v4.4.0
Hello, a beautiful weekend with few amazing contributions from community! We shipped a load of DX improvments this time for y'all and also few bug fixes!
Highlights in 4.4
Lint your package.json before build, give you better exports
⚠️ Cannot export `require` field with .js or .mjs extension in ESM package, only .cjs extensions are allowed
⚠️ ./dist/index.js
⚠️ Cannot export `import` field with .cjs extension in ESM package, only .js and .mjs extensions are allowed
⚠️ ./dist/foo.cjs
Clean your dist folder before building
If you dont want to auto clean build bundles, just use --no-clean
option
bunchee --no-clean # clean is by default
development
and production
export conditions
src/index.js
can be injected with NODE_ENV
based on the export conditon when using development
or production
{
"exports": {
"development": "./dist/index.development.js",
"production": "./dist/index.production.js",
}
}
Other Improvements
- will be auto injected with its corresponding
process.env.NODE_ENV
- Auto generate
tsconfig.json
for you in build if you don't have any - Robust CSS minification
Feature
- feat: auto clean dist folder before build by @nnecec in #369
- feat: auto inject env for development and production condition by @huozhi in #396
- Auto generate tsconfig.json for ts project by @huozhi in #399
- Lint package configuration by @huozhi in #401
- Use clean-css for css minification by @huozhi in #403
Patches
- Fix ending log and mixed exports condition by @huozhi in #397
- fix: ignore test file in prepare by @hyoban in #400
- docs: complete clean api by @nnecec in #402
New Contributors
Full Changelog: v4.3.4...v4.4.0