Packem

A fast, zero-config bundler for Node.js and TypeScript libraries. Built on Rollup with esbuild, swc, OXC, and sucrase support.

Packem

A bundler for Node.js and TypeScript libraries. Point it at your package.json and get optimized ESM, CJS, and IIFE bundles — with TypeScript declarations, CSS processing, and tree shaking out of the box.

npm install --save-dev @visulima/packem
npx packem init
npx packem build

Why Packem?

  • Zero config — Reads entry points, output formats, and types from your package.json. No duplicate configuration.
  • Fast — Choose between esbuild, swc, OXC, or sucrase. Switch compilers with one config change.
  • TypeScript first — Generates .d.ts declarations automatically, including isolated declarations.
  • CSS included — Sass, Less, Stylus, PostCSS, and CSS Modules work without extra plugins.
  • React ready — Server Components, Client Components, and server actions are supported.
  • Multi-runtime — Target Node.js, browser, edge-light, and react-server from a single build.

Pick a transformer

TransformerSpeedDecoratorsType checking
esbuildFastestNoNo
swcVery fastYesNo
OXCVery fastPartialNo
sucraseFastNoNo
TypeScriptModerateYesYes

Most projects should start with esbuild. See Transformers for details.

Packages

PackageDescription
@visulima/packemBundler core and CLI
@visulima/packem-rollupRollup plugins and transformer integrations
@visulima/rollup-plugin-cssCSS processing and optimization
@visulima/css-style-injectRuntime CSS injection utility
@visulima/packem-shareShared types and constants

Next steps

  • Getting Started — Install Packem and build your first library.
  • Configuration — Customize your build for production.
  • Examples — Copy-and-paste starters for common setups.
  • API Reference — Programmatic usage, hooks, and plugin development.
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