Guide

Learn how to install, configure, and ship production bundles with Packem.

Guide

Whether you are publishing your first npm package or maintaining a monorepo with dozens of libraries, these guides walk you through every step — from installation to production builds.

If you are new to Packem, start at the top and work your way down. Each guide builds on the previous one.

  1. Introduction — What Packem is, how it works, and when to use it.
  2. Getting Started — Install Packem and create your first bundle in under five minutes.
  3. Configuration — Customize entry points, output formats, and build behavior.
  4. Transformers — Pick the right compiler (esbuild, swc, OXC, sucrase, or TypeScript).
  5. CSS Processing — Add support for CSS, Sass, Less, Stylus, PostCSS, and CSS Modules.
  6. Debug and Profiling — Diagnose build issues and measure performance.

Working with Packem

Task-focused guides for everyday development:

  • package.json Setup — Drive entries, formats, and declarations from your package.json.
  • TypeScript — Declaration files, isolated declarations, and type checking.
  • React — Build React component libraries, including Server Components.
  • Multi-Runtime Builds — Target Node.js, browser, edge, and react-server from one build.
  • Plugins — Extend the build with Rollup plugins.
  • Optimization — Minification, tree shaking, and bundle size.
  • Watch Mode — Rebuild automatically during development.
  • CLI — Every command and flag the packem CLI offers.

Migrating to Packem

Coming from another bundler? Start here:

Troubleshooting

When something goes wrong:

  • Common Issues — Frequent problems and their fixes.
  • TypeScript — Declaration and type-checking errors.
  • CSS — Styling and preprocessor problems.
  • Build Errors — Diagnose and resolve build failures.

Already familiar with Packem?

Jump straight to the reference material:

Support

Contribute to our work and keep us going

Community is the heart of open source. The success of our packages wouldn't be possible without the incredible contributions of users, testers, and developers who collaborate with us every day.Want to get involved? Here are some tips on how you can make a meaningful impact on our open source projects.

Ready to help us out?

Be sure to check out the package's contribution guidelines first. They'll walk you through the process on how to properly submit an issue or pull request to our repositories.

Submit a pull request

Found something to improve? Fork the repo, make your changes, and open a PR. We review every contribution and provide feedback to help you get merged.

Good first issues

Simple issues suited for people new to open source development, and often a good place to start working on a package.
View good first issues