Skip to content
/ obuild Public

πŸ“¦ 😯 Zero-config ESM/TS package builder. powered by oxc, rolldown and rolldown-plugin-dts.

License

Notifications You must be signed in to change notification settings

unjs/obuild

Repository files navigation

πŸ“¦ obuild 😯

βœ… Zero-config ESM/TS package builder.

Powered by oxc, rolldown and rolldown-plugin-dts.

The obuild project aims to be the next-generation successor to the current unbuild.

  • 🌱 Fresh rewrite with cleanups and removal of legacy features.
  • πŸš€ Uses oxc and rolldown instead of rollup and mkdist.
  • πŸ‘Œ Strict ESM-compliant imports with explicit extensions.
  • πŸ”’ Types are built with isolated declaration constraints.
  • πŸͺ¦ No support for CommonJS output.

Some differences are not easy to adopt. Developing as a standalone project allows for faster progress and dogfooding in real projects.

πŸ‘€ See this issue for more explanation about the difference between obuild, unbuild, tsup, and tsdown.

Usage

CLI:

# bundle
npx obuild ./src/index.ts

# transform
npx obuild ./src/runtime/:./dist/runtime

You can use --dir to set the working directory.

Programmatic:

import { build } from "obuild";

await build(".", ["./src/index.ts"]);

Note

Auto entries inference similar to unbuild coming soon (#4).

Currently used by

Proof of concept

Important

This is a proof-of-concept project.

Features are incomplete, and output behavior may change between versions.

Feedback and contributions are very welcome! If you'd like to make changes with more than a few lines of code, please open an issue first to discuss.

License

πŸ’› Released under the MIT license.

About

πŸ“¦ 😯 Zero-config ESM/TS package builder. powered by oxc, rolldown and rolldown-plugin-dts.

Resources

License

Stars

Watchers

Forks