Father-build is the primary library build tool within the UmiJS ecosystem, often referred to simply as 'Father'. Currently stable at version 4.6.17, it's a powerful and highly configurable solution for packaging JavaScript and TypeScript libraries. It leverages Rollup for robust bundling and integrates esbuild for performance optimizations across various output formats, including ESM, CJS, UMD, and a 'bundless' mode for individual file compilation. The project maintains a very active development pace, frequently issuing multiple minor and patch updates each month, incorporating new features like CSS extraction, enhanced JSX runtime support, and parallel bundless compilation. Key differentiators include comprehensive TypeScript support (shipping its own types and regularly upgrading internal TS versions), flexible configuration via `father.config.ts` using `defineConfig`, and a strong focus on delivering optimized output for diverse JavaScript environments. It aims to streamline library development by abstracting complex build configurations and providing a consistent developer experience.
npm install father-buildVerified import paths — ran on the pinned version, not inferred.
Demonstrates a typical `father` setup in a `package.json` with a comprehensive `father.config.ts` for ESM, CJS, UMD, and bundless outputs, along with a simple TypeScript source file. Run `npm install` then `npm run build`.
Consult the official Father v4 migration guide for a detailed overview of breaking changes and updated configuration patterns.
Remove `babel-plugin-dynamic-import-node` from your Babel configuration. `father` now handles async chunks internally; review if your dynamic import statements require any specific adjustments for the new behavior.
If your UMD bundle relies on specific polyfills in a Node.js environment, you must manually include these polyfills in your project or ensure the target Node.js version natively supports the required APIs.
If experiencing `ajv`-related issues with `Bun`, consider using `npm` or `yarn` for dependency installation as an alternative, or check for updated `Bun` compatibility information and `father` releases addressing these specific scenarios.
Ensure your project's `typescript` dependency is compatible with TypeScript 5.4.x, or a version range that is known to work well with `father`'s internal TS version. Review your `tsconfig.json` for any compiler options that might conflict with newer TypeScript versions.
Remove `babel-plugin-dynamic-import-node` from your Babel configuration. Father v4.5.1+ handles dynamic imports via its internal `asyncChunks` mechanism.
Try `npm install` or `yarn install` instead of `bun install`. Ensure your `father` and `ajv` versions are the latest to pick up any compatibility fixes.
For UMD bundles used in Node.js, explicitly add necessary polyfills to your project or adjust your build target if these polyfills are critical for your library's runtime.
No dependency data recorded yet.