close
logo
Rslib
Guide
Config
Blog
English
简体中文
Guide
Config
Blog
English
简体中文
logo
Rslib

Getting Started

Introduction
Quick start
Glossary
Packages

Solution

Node.js
React
Vue

Basic

CLI
Configure Rslib
Use TypeScript
Output format
Output structure
Upgrade Rslib

Advanced

Handle third-party dependencies
Output compatibility
Declaration files
Import static assets
Import SVGR
Import JSON files
Module Federation
Use Storybook

Migration

Modern.js Module
tsup

FAQ

Features FAQ
📝 Edit this page on GitHub
Previous PageOutput structure
Next PageHandle third-party dependencies

#Upgrade Rslib

This section explains how to upgrade the project's Rslib dependencies to the latest version.

INFO

Rslib is still in 0.x version stage, and the API may change frequently. We recommend upgrading to the latest version to access new features and bug fixes.

#Using taze

We recommend using Taze to upgrade the Rslib version. Taze is a CLI tool for updating npm dependencies.

#Usage

Run the following command to upgrade all dependencies that include rslib and rsbuild in their names:

npx taze major --include "/(rsbuild|rslib)/" -w
TIP

Rslib has not yet reached version 1.0.0, so you need to add the major parameter when updating.

The result will look similar to:

rslib - 2 major, 1 patch

  @rsbuild/plugin-react       dev  ~2mo  ^1.0.1   →  ^1.0.6
  @rslib/core                 dev  ~7d  ^0.0.15  →  ^0.0.16
  rsbuild-plugin-dts          dev  ~7d  ^0.0.15  →  ^0.0.16

ℹ changes written to package.json, run npm i to install updates.

You can also adjust the include pattern to match specific packages, for example, to upgrade only packages under the @rslib scope:

npx taze --include /@rslib/ -w

#Options

Here are some examples of using taze options.

  • In a monorepo, you can add the -r option to upgrade recursively:
npx taze --include /(rsbuild|rslib)/ -w -r
  • Add -l to upgrade locked versions:
npx taze --include /(rsbuild|rslib)/ -w -l
  • To upgrade to a major version:
npx taze major --include /(rsbuild|rslib)/ -w

For more options, please refer to the taze documentation.