💖 GitHub Sponsors • 💬 Discord • ✨ Repo • 📦 NPM • 📚 Docs
@reliverse/relidler is a flexible, unified, and fully automated bundler for TypeScript and JavaScript projects, as well as an NPM and JSR publishing tool.
- 😘 Drop-in replacement for
unbuild
- ⚡
relidler
works via CLI and SDK - 📦 Automated NPM/JSR publishing
- ✅ Ensures reliable JS/TS builds
- 🔄 Handles automatic version bumps
- 🔧 Eliminates
package.json
headaches - 🎯 Optimized for speed and modern workflows
- 🛠️ Converts TypeScript aliases to relative paths
- ✨ Packed with powerful features under the hood
- 📝 Highly configurable flow via a configuration file
- 🔌 Plugin system with two built-in plugins included
Ensure git, node.js, and bun/pnpm/yarn/npm are installed. Then:
Want to test Relidler before integrating it into your project? Clone the repo and build it using Relidler itself:
git clone https://github.com/reliverse/relidler.git
cd relidler
bun i
bun dev # bun src/main.ts --dev
-
Install globally:
bun i -g @reliverse/relidler
Or update as needed:
bun -g update --latest
-
Prepare your project:
a. Configure
.gitignore
:echo "*.log" >> .gitignore echo "dist-npm" >> .gitignore echo "dist-jsr" >> .gitignore echo "dist-libs" >> .gitignore
b. Install config intellisense:
bun add -D @reliverse/relidler-cfg
c. Initialize
relidler.cfg.ts
:relidler
- The
relidler.cfg.ts
file is automatically created on first run. - It's recommended to customize this file according to your needs.
- Supported filenames:
relidler.cfg.ts
•relidler.config.ts
•build.pub.ts
•build.cfg.ts
. - You can check an example config here: relidler.cfg.ts
- The
-
Run and enjoy:
relidler
Relidler includes a plugin system with two built-in plugins:
Builds and publishes specified subdirectories of your main project as separate packages.
Usage example: The @reliverse/relidler-cfg
configuration for src/libs/cfg dir:
// relidler.cfg.ts
libsActMode: "main-and-libs",
libsDirDist: "dist-libs",
libsDirSrc: "src/libs",
libsList: {
"@reliverse/relidler-cfg": {
libDeclarations: true,
libDescription: "@reliverse/relidler defineConfig",
libDirName: "cfg",
libMainFile: "cfg/cfg-main.ts",
libPkgKeepDeps: false,
libTranspileMinify: true,
},
},
Enables you to run specific Relidler features:
relidler tools --tool <tool> --input <dir> --out <file> [options]
Available tools:
agg
: Generates aggregator file with content likeexport { getSomething } from "./utils.js"
. Note: Currently it replaces the file content, not appends.
Usage example: If you're exploring the Example Playground, you can try the following:
- Open src/libs/sdk/sdk-main.ts in your IDE.
- Press
Ctrl+A
, thenBackspace
. Run the command below and watch the magic happen:
bun tools:agg # Shortcut for:
bun src/main.ts tools --dev --tool agg --input src/libs/sdk/sdk-impl --out src/libs/sdk/sdk-main.ts --recursive --named --strip src/libs/sdk
The SDK allows you to create new Relidler plugins or even extend your own CLI functionality.
bun add -D @reliverse/relidler-sdk
Usage example: @reliverse/cli leverages this SDK to extend its functionality.
-
Implement stableregular
build and publish - Implement stable
library
build and publish - Achieve full drop-in replacement for
unbuild
- Support auto migration from
build.config.ts
- Allow plugins to extend Relidler's
defineConfig
- Support configuration via
reliverse.{ts,jsonc}
- Make config file optional with sensible defaults
Special thanks to the project that inspired Relidler: