Reducing Tooling Fatigue with Bun's Built-in Bundler
Stop managing complex config files. Learn how Bun's built-in Rust-based bundler handles TypeScript and CommonJS natively to streamline your build pipeline.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Stop managing complex config files. Learn how Bun's built-in Rust-based bundler handles TypeScript and CommonJS natively to streamline your build pipeline.
Blanket core-js imports bloat bundles and risk overriding natives. Targeted modular imports with runtime feature detection give smaller builds and safer polyfills for web and Node apps.
Spot and fix Rollup tree‑shaking failures that leave unused code in your bundle. Follow a step‑by‑step diagnostic checklist, example config, and verification steps to reduce bundle size.
Learn how Rollup's preserveModules option keeps your ES module file structure intact while allowing tree‑shaking of external dependencies.
Diagnose Rollup circular dependency warnings by reading the module chain, extracting shared code to a leaf module, deferring with dynamic import, or externalizing third-party cycles.
Learn how Rollup's manualChunks option separates vendor code into a stable chunk, improving long‑term caching and reducing unnecessary downloads.
A decision guide for publishing a library with Rollup: why dual es + cjs output is the practical default, how external and sideEffects settings make or break tree-shaking, and how to validate the result.
Rollup's tree-shaking works because ES modules are statically analyzable. Here's how it prunes unused code, a verifiable example, and the side-effect and CommonJS pitfalls that defeat it.
Rollup’s sideEffects flag lets you prune unused code, but it must be used carefully. Learn how to set the flag, test bundle size gains, and avoid breaking your app.