Freedom251 › JavaScript Build Tools
Rslib

What Rslib is
Rslib is a build tool for JavaScript packages and UI component libraries, based on Rsbuild and powered by Rspack. It offers bundle and bundleless build modes and can produce ESM, CJS, UMD, Module Federation, and IIFE outputs. Developers can build component libraries for React, Vue, Svelte, and Solid, or start from templates for those frameworks and Node.js packages.
Rslib supports TypeScript, code splitting, tree shaking, and source maps. It can also generate TypeScript declaration files, including isolated declarations, though declaration generation must be enabled. Plugin options include Rsbuild, Rspack, and webpack plugins. Its development integrations include Rstest for testing, Storybook for component development, Rspress for component 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 free and open source under the MIT license, with no paid tiers stated. The listed platforms are API, Linux, macOS, web, and Windows. The project identifies ByteDance Inc. in its copyright notice and invites users to connect with its team and community on Discord.
Who it suits
Rslib suits developers building JavaScript packages or component libraries for React, Vue, Svelte, or Solid. It is also a fit for teams that want a configurable build tool with integrations for testing, component development, documentation, and build analysis.
What it does well
- Builds ESM, CJS, UMD, Module Federation, and IIFE outputs.
- Supports bundle and bundleless build modes.
- Framework integrations cover React, Vue, Svelte, and Solid.
- Works with Rsbuild, Rspack, and webpack plugins.
- MIT-licensed and free to use.
What to know first
- TypeScript declaration generation is off by default.
- Rslib v1 requires Node.js 20.19+ or 22.12+.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Free and open source | MIT license; no paid tiers stated | Free |
As lib.rsbuild.dev lists them, read 7 Oct 2026. The maker's own page has the final word.
Getting started
- Visit https://lib.rsbuild.dev/ for the project and quick-start guide.
- Choose a create-rslib template for Node.js, React, Vue, Svelte, or Solid.
- Use Node.js, Deno, or Bun as the JavaScript runtime; Rslib v1 requires Node.js 20.19+ or 22.12+.
- Select bundle or bundleless mode and configure the desired output formats.
- Enable TypeScript declaration generation if your library needs declaration files.
Overview
Rslib is a free, open source build tool for JavaScript packages and UI component libraries, built on Rsbuild. It is best suited to developers who want one library workflow spanning several UI frameworks and output formats. Its broad integrations make it a capable choice for that work, provided your environment meets v1’s Node.js requirement and you are prepared to enable declaration generation when needed.
Key features
Rslib supports bundle and bundleless builds, with ESM, CJS, UMD, Module Federation, and IIFE outputs. That range gives package authors flexibility to target different consumers from the same tool. TypeScript support, tree shaking, code splitting, and source maps add useful controls for producing and diagnosing library builds.
Its framework integrations cover React, Vue, Svelte, and Solid, and the project templates include those four alongside Node.js packages. This makes Rslib a practical starting point for component libraries, particularly when a team works across frameworks. Support for Rsbuild, Rspack, and webpack plugins can also help developers reuse extensions they already rely on.
Rslib uses Rspack and integrates Rust-based tools such as SWC and Lightning CSS. The broader workflow connects to Rstest for testing, Storybook for component development, Rspress for previews and API documentation from library sources and typings, and Rsdoctor for build analysis. These connections are a strength for teams building within that ecosystem; they offer less advantage to someone seeking only a small, standalone bundler.
TypeScript declaration files, including isolated declarations, are supported but are not generated by default. That opt-in is easy to miss when declarations are part of a package’s deliverable, so maintainers should account for it in their build configuration. The quick-start guide names Node.js, Deno, and Bun as possible runtimes, but Rslib v1 requires Node.js 20.19+ or 22.12+. The version floor is a real constraint for projects on older Node.js releases.
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 stated plan quotas, seat limits, or trial terms to weigh; the key adoption costs are technical, especially the v1 Node.js requirement and the configuration needed to generate declarations.
Platforms
Rslib is listed for API, Linux, macOS, web, and Windows. For developers choosing a library build tool, its runtime requirements and framework integrations are more consequential than that broad platform coverage.
Who it's for
Rslib fits developers creating JavaScript packages, Node.js packages, or component libraries for React, Vue, Svelte, and Solid. It is particularly appealing when a project benefits from multiple output formats, plugin reuse, and connected tools for testing, component development, documentation, or build inspection.
It is a weaker fit for teams that cannot move to a supported Node.js version for v1, or that expect TypeScript declarations to be emitted automatically without enabling the option. Developers who only need a narrow build step may also find its framework and workflow integrations unnecessary.
Pros and cons
- Pros: Multiple build modes and five output formats give library authors room to serve varied consumers.
- Pros: React, Vue, Svelte, and Solid integrations, templates, and plugin compatibility support diverse library projects.
- Pros: MIT-licensed and free, with integrations for testing, component work, documentation, and build analysis.
- Cons: Rslib v1 requires Node.js 20.19+ or 22.12+, which rules out older Node.js environments.
- Cons: Declaration generation is opt-in, adding a configuration step for TypeScript libraries that publish typings.
Alternatives
For another free, open source option, consider Rolldown. esbuild is another free, MIT-licensed choice, offered as a native executable or WebAssembly version. Developers looking at Rust-based tooling can consider free, open source SWC; those focused on Rspack itself can choose the free MIT-licensed Rspack.
Terser is a free JavaScript minifier toolkit. Vite is a free, open source MIT-licensed option. Google Closure Compiler is an open source Java application, Bazel library, and NPM package. Grunt is an open source JavaScript task runner. To compare more options in the category, see JavaScript Build Tools.
Verdict
Choose Rslib if you are building JavaScript packages or UI component libraries and can use its framework integrations, output formats, and plugin ecosystem. Its free MIT license and connected development tools make it a strong fit for that workflow. Look elsewhere if v1’s Node.js floor is impractical or you need declaration files emitted without enabling the option.
Verdict
Choose Rslib for JavaScript packages or UI component libraries when its output formats, framework integrations, and plugin support fit your build. Look elsewhere if you need declaration files generated without enabling that option or cannot meet the Node.js requirement for v1.
Questions
Is Rslib free?
Yes. It is free and open source under the MIT license, and no paid tiers are stated.
Which output formats does Rslib support?
It supports ESM, CJS, UMD, Module Federation, and IIFE.
Which component frameworks does it support?
Its framework integrations support React, Vue, Svelte, and Solid.
Does Rslib generate TypeScript declarations?
Yes. It supports declaration files, including isolated declarations, but generation is not enabled by default.
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+.
Who makes Rslib?
The project site identifies ByteDance Inc. in its copyright notice.
Facts from Rslib's own pages
- Build analysis
- The Rslib guide describes using Rsdoctor to inspect build outputs and the build process. · lib.rsbuild.dev, 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. · lib.rsbuild.dev, 7 Oct 2026
- Build modes
- Rslib supports bundle and bundleless build modes. · lib.rsbuild.dev, 7 Oct 2026
- Community support
- The project invites users to chat with the Rstack team and community on Discord. · lib.rsbuild.dev, 7 Oct 2026
- Component development
- Rslib integrates with Storybook through the Rsbuild-powered builder, which can derive its configuration from an Rslib config file. · lib.rsbuild.dev, 7 Oct 2026
- Declaration files
- Rslib supports generating TypeScript declaration files, and declaration generation is not enabled by default. · lib.rsbuild.dev, 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. · lib.rsbuild.dev, 7 Oct 2026
- Documentation integration
- Rslib can be used with Rspress to preview components and display API documentation from library sources and typings. · lib.rsbuild.dev, 7 Oct 2026
- Frameworks
- Rslib supports React, Vue, Svelte, and Solid component libraries through plugins. · lib.rsbuild.dev, 7 Oct 2026
- Framework support
- Rslib supports building component libraries for React, Vue, Svelte, and Solid through its framework integrations. · lib.rsbuild.dev, 7 Oct 2026
- License
- Rslib is free and open source software released under the MIT license. · lib.rsbuild.dev, 7 Oct 2026
- Maker
- The official site identifies ByteDance Inc. in its copyright notice. · lib.rsbuild.dev, 7 Oct 2026
- Output formats
- Rslib supports ESM, CJS, UMD, Module Federation, and IIFE output formats. · lib.rsbuild.dev, 7 Oct 2026
- Performance
- Rslib is powered by Rspack and integrates Rust-based tools including SWC and Lightning CSS. · lib.rsbuild.dev, 7 Oct 2026
- Plugin integrations
- Rslib supports Rsbuild plugins, Rspack plugins, and webpack plugins. · lib.rsbuild.dev, 7 Oct 2026
- Purpose
- Rslib is an Rsbuild-based tool for developing JavaScript libraries and UI component libraries. · lib.rsbuild.dev, 7 Oct 2026
- Runtime requirement
- Rslib v1 requires Node.js 20.19+ or 22.12+. · lib.rsbuild.dev, 7 Oct 2026
- Runtimes
- The quick-start guide lists Node.js, Deno, and Bun as supported JavaScript runtimes. · lib.rsbuild.dev, 7 Oct 2026
- Runtime support
- The quick start guide says Rslib can use Node.js, Deno, or Bun as its JavaScript runtime. · lib.rsbuild.dev, 7 Oct 2026
- Scaffold templates
- The create-rslib templates include Node.js, React, Vue, Svelte, and Solid projects. · lib.rsbuild.dev, 7 Oct 2026
- Testing integration
- New Rslib projects include Rstest as the test framework by default, and an official adapter can inherit Rslib configuration. · lib.rsbuild.dev, 7 Oct 2026
- Type declarations
- Rslib supports generating TypeScript declaration files, including isolated declarations. · lib.rsbuild.dev, 7 Oct 2026
- Version requirement
- Rslib v1 requires Node.js 20.19+ or 22.12+. · lib.rsbuild.dev, 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. · lib.rsbuild.dev, 7 Oct 2026
Where Rslib stands on Freedom251
- JavaScript Build Tools#6 of 27