Release May 12, 2026 4 min read

@fotros/bundler v1.5 — Automatic Package.json Exports Field

The bundler now automatically generates a correct exports field in your package.json, covering all module formats and TypeScript declaration files.

Getting the package.json exports field right is notoriously difficult. ESM entry, CJS fallback, TypeScript declarations, browser vs Node conditions — one mistake and your users get confusing import errors. @fotros/bundler v1.5 now generates this field automatically.

Generated exports Field

json
1
{
2
  "exports": {
3
    ".": {
4
      "import": "./dist/index.js",
5
      "require": "./dist/index.cjs",
6
      "types": "./dist/index.d.ts"
7
    }
8
  }
9
}
Tags
npmReleaseBundlerESM
// RELATED POSTS

You might also like