Bob The Bundler is a TypeScript build and bundle tool designed primarily for monorepos, widely used by The Guild's open-source projects. Its current stable version is 7.0.1, with major releases introducing breaking changes, often around module systems and Node.js compatibility. Key features include building ESM and CommonJS compatible npm packages, verifying module imports for usability, and enabling incremental builds for performance in monorepo setups. It supports pnpm workspaces and offers configurable TypeScript `tsconfig` paths. Bob emphasizes a strict, convention-based approach to bundling, providing a robust solution for complex JavaScript/TypeScript projects that require precise control over build outputs and types.
npm install bob-the-bundlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic usage of Bob The Bundler to build a TypeScript project, including common configuration options like entry points, output formats, and `tsconfig` path. It also hints at typical CLI usage.
Remove `bob runify` from your build scripts and adopt alternative tools or custom scripts for your specific task.
Upgrade your Node.js environment to version 16 or newer. Verify `engines.node` in your `package.json`.
Migrate programmatic imports from `const pkg = require('bob-the-bundler');` to `import * as pkg from 'bob-the-bundler';` or named imports like `import { build } from 'bob-the-bundler';`.Update your `package.json` exports map. For `require` entries, change `"types": "./dist/typings/index.d.ts"` to `"types": "./dist/typings/index.d.cts"`.
Ensure your build-specific TypeScript configuration is either in `tsconfig.build.json` or explicitly specified via a configuration option if you wish to use a different file.
Change your import statement to use ES Modules syntax: `import { build } from 'bob-the-bundler';`.Update your `package.json` scripts or build automation to remove calls to `bob runify`. Consider replacing it with `bob build` or a custom script.
Upgrade your Node.js environment to version 16 or higher.
Install TypeScript in your project: `npm install typescript` or `pnpm add typescript`.
If your `package.json` `exports` map specifies `require` for types, ensure it uses `.d.cts` for the declaration file, e.g., `"types": "./dist/typings/index.d.cts"`.