EVERYTHING XIAOMI
Get listed

Rslib

Rslib is a free, open-source build tool for JavaScript packages and UI component libraries.

Place
#3 of 27
Score
6.8
Rslib's website

What Rslib is

Rslib is a free, open-source build tool for JavaScript packages and UI component libraries. Based on Rsbuild and powered by Rspack, it integrates Rust-based tools including SWC and Lightning CSS. Developers can choose bundle or bundleless builds and produce ESM, CJS, UMD, Module Federation, or IIFE output. Framework integrations support libraries for React, Vue, Svelte, and Solid, while starter templates also cover Node.js packages. Rslib works with Rsbuild, Rspack, and webpack plugins. It can generate TypeScript declaration files, including isolated declarations, but declaration generation is not enabled by default. Its development integrations include Rstest for testing, Storybook for component work, Rspress for previews and API documentation, and Rsdoctor for build analysis. The quick-start guide lists Node.js, Deno, and Bun as JavaScript runtime options; Rslib v1 requires Node.js 20.19+ or 22.12+. It is released under the MIT license and available for API, Linux, macOS, web, and Windows. The project invites users to connect with the Rstack team and community on Discord.

Good

  • Supports five JavaScript output formats.
  • Framework integrations cover React, Vue, Svelte, and Solid.
  • Works with Rsbuild, Rspack, and webpack plugins.
  • Offers bundle and bundleless build modes.
  • Free and open source under the MIT license.

Watch out

  • TypeScript declaration generation is not enabled by default.
  • Rslib v1 requires specific Node.js versions.

Who it suits

Rslib is for developers building JavaScript packages or component libraries across supported UI frameworks. It can fit projects that need multiple output formats and integrations with testing, documentation, or component-development tools.

Verdict

Rslib offers a broad build and development toolchain for JavaScript packages and UI libraries. Check the Node.js requirement and enable declaration generation separately if your project needs it.

Plans and prices

From Rslib's own pricing page, checked 7 Oct 2026.

All about pricing
PlanPriceWhat it gives you
Free and open sourceFreeMIT license; no paid tiers stated

The facts

Each one read from Rslib's own pages, with the date it was checked.

What it does

Build analysis
The Rslib guide describes using Rsdoctor to inspect build outputs and the build process.checked 7 Oct 2026
Build engine
Rslib is based on Rsbuild and uses Rspack, with SWC and Lightning CSS among the Rust-based tools it integrates.checked 7 Oct 2026
Build modes
Rslib supports bundle and bundleless build modes.checked 7 Oct 2026
Community support
The project invites users to chat with the Rstack team and community on Discord.checked 7 Oct 2026
Component development
Rslib integrates with Storybook through the Rsbuild-powered builder, which can derive its configuration from an Rslib config file.checked 7 Oct 2026
Declaration files
Rslib supports generating TypeScript declaration files, and declaration generation is not enabled by default.checked 7 Oct 2026
Development integrations
The documentation describes integrations with Storybook for component development, Rspress for documentation, Rstest for testing, and Rsdoctor for build analysis.checked 7 Oct 2026
Documentation integration
Rslib can be used with Rspress to preview components and display API documentation from library sources and typings.checked 7 Oct 2026
Frameworks
Rslib supports React, Vue, Svelte, and Solid component libraries through plugins.checked 7 Oct 2026
Framework support
Rslib supports building component libraries for React, Vue, Svelte, and Solid through its framework integrations.checked 7 Oct 2026
License
Rslib is free and open source software released under the MIT license.checked 7 Oct 2026
Output formats
Rslib supports ESM, CJS, UMD, Module Federation, and IIFE output formats.checked 7 Oct 2026
Performance
Rslib is powered by Rspack and integrates Rust-based tools including SWC and Lightning CSS.checked 7 Oct 2026
Plugin integrations
Rslib supports Rsbuild plugins, Rspack plugins, and webpack plugins.checked 7 Oct 2026
Purpose
Rslib is an Rsbuild-based tool for developing JavaScript libraries and UI component libraries.checked 7 Oct 2026
Runtime requirement
Rslib v1 requires Node.js 20.19+ or 22.12+.checked 7 Oct 2026
Runtimes
The quick-start guide lists Node.js, Deno, and Bun as supported JavaScript runtimes.checked 7 Oct 2026
Runtime support
The quick start guide says Rslib can use Node.js, Deno, or Bun as its JavaScript runtime.checked 7 Oct 2026
Scaffold templates
The create-rslib templates include Node.js, React, Vue, Svelte, and Solid projects.checked 7 Oct 2026
Testing integration
New Rslib projects include Rstest as the test framework by default, and an official adapter can inherit Rslib configuration.checked 7 Oct 2026
Type declarations
Rslib supports generating TypeScript declaration files, including isolated declarations.checked 7 Oct 2026
Version requirement
Rslib v1 requires Node.js 20.19+ or 22.12+.checked 7 Oct 2026
Who it is for
Rslib is aimed at developers creating JavaScript packages, including Node.js packages and component libraries for multiple UI frameworks.checked 7 Oct 2026

The company

Maker
The official site identifies ByteDance Inc. in its copyright notice.checked 7 Oct 2026
The full review of Rslib

Overview

Rslib is a build tool for JavaScript packages and UI component libraries, built on Rsbuild. It is best suited to developers who want one configurable toolchain for library builds across frameworks and output formats. Its broad integrations are a strength, but v1’s Node.js floor and optional declaration generation call for a little setup planning.

Key features

Rslib supports both bundled and bundleless builds, with ESM, CJS, UMD, Module Federation, and IIFE outputs. That breadth gives package authors flexibility to target different consumers; TypeScript support, tree shaking, code splitting, and source maps cover useful parts of the build workflow. Developers who need only a single output format may find this range more than they need.

Framework integrations cover React, Vue, Svelte, and Solid, with starter templates for each as well as Node.js projects. That makes Rslib a practical option for teams building component libraries across ecosystems. Its plugin API accepts Rsbuild, Rspack, and webpack plugins, which can reduce friction for developers already using extensions from those toolchains.

Under the hood, Rslib uses Rspack and integrates Rust-based tools including SWC and Lightning CSS. It also connects with Rstest for testing, Storybook for component development, Rspress for component previews and API documentation, and Rsdoctor for inspecting builds. These integrations can support a broader library workflow, though their value is lower for developers who only need a basic package build.

TypeScript declaration files, including isolated declarations, are supported but are not generated by default. Teams whose consumers rely on typings need to enable that step explicitly. The quick-start guide names Node.js, Deno, and Bun as usable runtimes, but Rslib v1 requires Node.js 20.19+ or 22.12+; projects on older Node versions must upgrade or choose another approach.

Pricing

Rslib is free and open source under the MIT license. The Free and open source plan costs nothing, and no paid tiers are stated. There are no paid-plan trade-offs to weigh, making it accessible for individual developers as well as teams evaluating it for production library work.

Platforms

Rslib is listed for API, Linux, macOS, web, and Windows. The available runtimes include Node.js, Deno, and Bun, but v1’s Node.js version requirement remains the key compatibility consideration.

Who it's for

Rslib is a strong fit for developers publishing JavaScript packages or maintaining component libraries for React, Vue, Svelte, or Solid, particularly when they want bundled or bundleless builds and several output formats in one tool. It is less compelling for a project that needs only a narrow build step, or for teams unable to meet its Node.js v1 requirement.

Pros and cons

  • Pros: Broad output-format support gives library authors flexibility for different consumers.
  • Pros: Framework integrations and templates cover four UI ecosystems alongside Node.js packages.
  • Pros: Integration with testing, component development, documentation, and build-analysis tools can support more of the library workflow.
  • Cons: Rslib v1 requires Node.js 20.19+ or 22.12+, which excludes projects that cannot upgrade.
  • Cons: Declaration generation is off by default, so teams relying on TypeScript typings must configure it themselves.

Alternatives

For a wider set of JavaScript build tools, browse JavaScript Build Tools.

  • Rolldown is another free and open-source option, with Android among its listed platforms.
  • SWC is a free, open-source Rust-based developer toolchain if you want that narrower alternative.
  • esbuild offers free MIT-licensed software as a native executable or WebAssembly version.
  • Rspack is free and MIT-licensed; consider it when you want the build engine underlying Rslib rather than Rslib’s library-focused layer.
  • Vite is a free, MIT-licensed open-source alternative.
  • Google Closure Compiler is a free open-source Java application, also offered as a Bazel library and NPM package.
  • Terser is a free JavaScript minifier toolkit for a more focused tool.
  • Turbopack is included in Next.js and may suit readers seeking a build tool within that framework.

Verdict

Choose Rslib if you build JavaScript packages or UI component libraries and want flexible outputs, framework integrations, and connections to tools across the development workflow at no cost. Look elsewhere if your project cannot meet the Node.js v1 requirement, or if you need a simpler tool and would rather avoid configuring declaration generation separately.

Getting started

  1. Open the Rslib website and choose a create-rslib template
  2. Select a Node.js, React, Vue, Svelte or Solid project
  3. Use Node.js, Deno or Bun as the JavaScript runtime
  4. For Rslib v1, use Node.js 20.19+ or 22.12+
  5. Configure bundle or bundleless output and framework integrations
  6. Enable TypeScript declaration generation if required
  7. Add Rstest, Storybook, Rspress or Rsdoctor integrations as needed

Questions

Is Rslib free?

Yes. Rslib is free and open source under the MIT license, with no paid tiers stated.

Which frameworks does it support?

Its framework integrations support React, Vue, Svelte and Solid component libraries.

Which runtimes can it use?

The quick-start guide lists Node.js, Deno and Bun. Rslib v1 requires Node.js 20.19+ or 22.12+.

Can it generate TypeScript declarations?

Yes. Rslib supports TypeScript declaration files, including isolated declarations, but generation is not enabled by default.

What output formats are available?

Rslib supports ESM, CJS, UMD, Module Federation and IIFE outputs.

What development integrations are included?

Rstest supports testing, Storybook supports component development, Rspress supports previews and API documentation, and Rsdoctor supports build analysis.

Alternatives to Rslib

All alternatives
  1. 1Rolldown logo

    Rolldown

    Free planAndroidWebAPILinux
    7.2Free plan
  2. 2SWC logo

    SWC

    Free planAndroidWebAPILinux
    7.1Free plan
  3. 3esbuild logo

    esbuild

    Free planAndroidWebAPILinux
    6.7Free plan
  4. 4
    6.6Free plan
  5. 5Vite logo

    Vite

    Free planWebLinuxmacOSWindows
    6.4Free plan
  6. 6Rspack logo

    Rspack

    Free planWebLinuxmacOSSelf-hosted
    6.3Free plan