Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Rslib

lib.rsbuild.dev

  • Free plan
  • Windows
  • macOS
  • Linux
  • Web
  • API
8.1 Club score Visit lib.rsbuild.dev

What Rslib is

Rslib is a free, open-source tool for building JavaScript packages and UI component libraries. It is based on Rsbuild and uses Rspack, with Rust-based tools including SWC and Lightning CSS. Developers can choose bundle or bundleless builds and generate ESM, CJS, UMD, Module Federation, or IIFE outputs. Framework integrations cover component libraries for React, Vue, Svelte, and Solid. Rslib also supports Rsbuild, Rspack, and webpack plugins, and can generate TypeScript declaration files, including isolated declarations; declaration generation is off 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 runtime options, though Rslib v1 requires Node.js 20.19+ or 22.12+. It supports TypeScript, code splitting, tree shaking, and source maps. Rslib is available for API, Linux, macOS, web, and Windows, under the MIT license. The project identifies ByteDance Inc. in its copyright notice.

Who it suits

Rslib suits developers creating JavaScript packages or UI component libraries across React, Vue, Svelte, and Solid. It may also fit teams that want build, test, component-preview, documentation, and analysis integrations in the same toolchain.

Good to know, and what to watch

  • Supports five output formats, including ESM and CJS.
  • Builds component libraries for four listed frameworks.
  • Integrates with Rsbuild, Rspack, and webpack plugins.
  • Offers testing, documentation, and build-analysis integrations.
  • Declaration generation is not enabled by default.
  • Rslib v1 requires Node.js 20.19+ or 22.12+.

Free and open source

Free

Free plan

Getting started

  1. Open the Rslib website
  2. Choose a create-rslib template for Node.js, React, Vue, Svelte, or Solid
  3. Use Node.js, Deno, or Bun as the JavaScript runtime
  4. Ensure Node.js 20.19+ or 22.12+ for Rslib v1
  5. Configure bundle or bundleless mode and your desired output format
  6. Connect Rstest, Storybook, Rspress, or Rsdoctor as needed

Limits to check

Rslib has no paid tiers stated. TypeScript declaration generation, including isolated declarations, must be enabled because it is not on by default.

The Club's review

Overview

Rslib is a library build tool in the Rsbuild ecosystem, designed for JavaScript packages and UI component libraries. It is a strong fit for developers who want framework integrations and development tools around the build process. Its broad output options are appealing, while v1’s Node.js floor and declaration files that are off by default are practical adoption considerations.

Key features

Rslib supports both bundled and bundleless builds, with ESM, CJS, UMD, Module Federation, and IIFE outputs. That gives package authors room to target different delivery formats within one tool. TypeScript support, code splitting, tree shaking, and source maps round out the core build capabilities, though authors who need type declarations must enable generation themselves; isolated declarations are supported.

Framework integrations cover React, Vue, Svelte, and Solid, and the starter templates include projects for each as well as Node.js packages. This breadth is useful for teams building component libraries across frameworks, but may be more than a single-package project needs. Rslib accepts Rsbuild, Rspack, and webpack plugins, which can help teams reuse extensions from those ecosystems.

Built on Rsbuild and powered by Rspack, Rslib integrates Rust-based tools including SWC and Lightning CSS. The surrounding workflow connects to Rstest for testing, Storybook for component development, Rspress for component previews and API documentation from sources and typings, and Rsdoctor for build analysis. These integrations make Rslib a more complete option for library teams already using or considering those tools; a developer seeking only a focused bundler may not need them.

The quick-start guide covers Node.js, Deno, and Bun runtimes, while Rslib v1 specifically requires Node.js 20.19+ or 22.12+. That version floor is important when upgrading an existing environment or setting up a team machine. The project also offers a Discord community for support.

Pricing

Rslib is free and open source under the MIT license. Its Free and open source plan costs nothing, and no paid tiers are stated. There are no seat counts, usage quotas, or trial terms to weigh against the price, making cost straightforward for individual developers and teams alike.

Platforms

Rslib is listed for API, Linux, macOS, web, and Windows. Its runtime guidance names Node.js, Deno, and Bun, with the v1 Node.js requirement applying when that runtime is used.

Who it's for

Rslib suits developers building JavaScript packages or component libraries, especially teams that need output flexibility, TypeScript declarations, or integrations spanning frameworks such as React and Vue. It is also a sensible fit for teams already using Rsbuild or Rspack plugins and the connected testing, documentation, and analysis tools. A developer who needs only one narrow build step may find its broader workflow unnecessary, and projects unable to meet the v1 Node.js requirement should look elsewhere or plan an environment update.

Pros and cons

  • Pros: Multiple build modes and five output formats give library authors options for different consumers.
  • Pros: React, Vue, Svelte, and Solid integrations, plus Node.js and framework templates, support a range of package projects.
  • Pros: Testing, component development, documentation, and build analysis integrations connect several library tasks.
  • Pros: MIT licensing makes the software free to use without a paid tier.
  • Cons: v1 requires Node.js 20.19+ or 22.12+, which can constrain older environments.
  • Cons: Type declaration generation is not enabled by default, so TypeScript libraries need an extra configuration step.

Alternatives

JavaScript Build Tools is a useful directory for comparing options across the category. Consider Rolldown, Vite, SWC, Turbopack, esbuild, Terser, Rspack, or Google Closure Compiler when comparing other free tools in the build-tool category.

Verdict

Choose Rslib if you are building JavaScript packages or component libraries and want flexible outputs alongside framework and workflow integrations, all under a free MIT license. Its most compelling advantage is how much of a library team’s build and development workflow it can bring together. Look elsewhere if you need a narrow build utility or cannot meet the Node.js v1 requirement; if declaration files are part of your package, remember to enable their generation.

The verdict

Rslib brings package and component-library builds together with a broad set of framework and development integrations. Check the Node.js requirement and enable declaration generation if your project needs type files.

Questions people ask

Is Rslib free?

Yes. Rslib is free and open source, released under the MIT license.

Which frameworks can it build?

Its framework integrations support React, Vue, Svelte, and Solid component libraries. Templates also include Node.js package projects.

Which output formats are supported?

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

What runtimes can Rslib use?

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

Does Rslib generate TypeScript declarations?

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

Which development tools integrate with Rslib?

New projects include Rstest by default, and integrations are documented for Storybook, Rspress, and Rsdoctor.

What the maker publishes

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

Checked against the maker's pages on 7 Oct 2026.