Skip to content

v4.4.0

Compare
Choose a tag to compare
@huozhi huozhi released this 14 Jan 19:43
· 131 commits to main since this release

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

New Contributors

Full Changelog: v4.3.4...v4.4.0