Releases: web-infra-dev/rslib
v0.17.1
What's Changed
New Features 🎉
- feat: export Rsbuild types by @Timeless0911 in #1314
- feat(CLI): run
rslibwithout any sub-command to trigger build by @Timeless0911 in #1316 - feat(create-rslib): add AGENTS.md by @Timeless0911 in #1317
- feat: runtime chunk name default to
rslib-runtimeby @Timeless0911 in #1320
Bug Fixes 🐞
- fix(create-rslib): compatible with Storybook 10 by @fi3ework in #1310
- fix: verbose Rslib normalized config only in Rslib debug mode by @Timeless0911 in #1312
- fix: remove externalsPresets.node by @fi3ework in #1318
Other Changes
- chore(deps): update dependency vitest to v4 by @renovate[bot] in #1306
- chore(deps): update dependency @types/node to v24 by @renovate[bot] in #1305
- chore(deps): update all non-major dependencies by @renovate[bot] in #1307
- chore(deps): update all non-major dependencies by @renovate[bot] in #1308
- chore: add type module to package.json in examples by @Timeless0911 in #1313
- chore: rename rsbuildConfig to config by @chenjiahan in #1315
- chore(deps): bump Rsbuild 1.6.2 by @Timeless0911 in #1319
- Release v0.17.1 by @Timeless0911 in #1321
Full Changelog: v0.17.0...v0.17.1
v0.17.0
Highlights 💡
Improved ESM output
Optimizing ESM output has long been one of the key challenges faced by Rspack. Previously, we relied on module concatenation to optimize ESM outputs, but that approach had several limitations:
- Impure output – The generated files contained Rspack's runtime code.
- Prone to errors – Some modules could not be correctly concatenated, leading to unexpected runtime issues.
- Limited code-splitting support – Split bundles became complex and difficult to analyze or optimize statically.
To address these issues once and for all, we introduced an experimental plugin called EsmLibraryPlugin, purpose-built for constructing clean and efficient ESM libraries:
- Full control over the bundling process – All modules are linked during compilation, eliminating reliance on Rspack's runtime.
- Code-splitting support – Code after splitting can be statically analyzed and is tree-shaking friendly.
The image below compares the code splitting output before and after using this plugin — the left side shows the previous output, while the right side shows the cleaner output produced by EsmLibraryPlugin:
In Rslib, the EsmLibraryPlugin is now integrated out-of-the-box with experiments.advancedEsm enabled to generate ESM output that is high-quality, more friendly to static analysis, and supports code splitting.
export default {
lib: [
{
format: 'esm',
bundle: true,
experiments: {
advancedEsm: true,
},
},
],
};Tip
Currently this option only takes effect in bundle mode when format is 'esm'.
What's Changed
New Features 🎉
Other Changes
- chore(deps): update all non-major dependencies by @renovate[bot] in #1293
- chore(deps): update dependency nx to v22 by @renovate[bot] in #1294
- ci: add ecosystem CI by @fi3ework in #1296
- ci: add per commit notify by @fi3ework in #1298
- ci: fix yaml file by @fi3ework in #1299
- ci: add main branch to ecosystem-ci by @fi3ework in #1300
- ci: remove useless input by @fi3ework in #1301
- chore(deps): bump Rsbuild 1.6.0 by @Timeless0911 in #1303
- Release v0.17.0 by @Timeless0911 in #1304
New Contributors
Full Changelog: v0.16.1...v0.17.0
v0.16.1
What's Changed
Bug Fixes 🐞
Other Changes
- chore(CI): extract reusable yml and remove Node 20 tests by @Timeless0911 in #1283
- chore(deps): update all non-major dependencies by @renovate[bot] in #1284
- chore: bump Rsbuild 1.6.0-beta.1 and remove special
output.distPathmerge logic by @Timeless0911 in #1285 - chore(build): avoid using
requirein configuration file by @chenjiahan in #1288 - Release v0.16.1 by @Timeless0911 in #1289
Full Changelog: v0.16.0...v0.16.1
v0.16.0
Highlights 💡
Additional build CLI options
The Rslib build command now supports additional CLI options that take precedence over configuration file settings, and can even be used without any configuration file entirely.
For example: rslib build --entry index.ts --minify --tsconfig tsconfig.build.json.
Usage:
$ rslib build
Options:
-w, --watch turn on watch mode, watch for changes and rebuild
--entry <entry> set entry file or pattern (repeatable)
--dist-path <dir> set output directory
--bundle enable bundle mode (use --no-bundle to disable)
--format <format> specify the output format (esm | cjs | umd | mf | iife)
--syntax <syntax> set build syntax target (repeatable)
--target <target> set runtime target (web | node)
--dts emit declaration files (use --no-dts to disable)
--externals <pkg> add package to externals (repeatable)
--minify minify output (use --no-minify to disable)
--clean clean output directory before build (use --no-clean to disable)
--auto-extension control automatic extension redirect (use --no-auto-extension to disable)
--auto-external control automatic dependency externalization (use --no-auto-external to disable)
--tsconfig <path> use specific tsconfig (relative to project root)
What's Changed
New Features 🎉
- feat(dts): support using
output.distPathas dts emit path by @Timeless0911 in #1269 - feat: support more cli options for build command by @fi3ework in #1258
- feat: support build without config file by @fi3ework in #1275
Bug Fixes 🐞
- fix: merge
output.distPathcorrectly by @Timeless0911 in #1270 - fix: Node shims for
'javascript/esm'files by @Timeless0911 in #1274 - fix: cjs
import.meta.urlshims in async chunks by @Timeless0911 in #1281 - fix: align esX browserslist expression to caniuse by @fi3ework in #1280
Document 📖
- docs: specify how to debug Rslib config by @Timeless0911 in #1279
Other Changes
- chore(deps): update actions/setup-node action to v6 by @renovate[bot] in #1268
- chore(deps): bump Rsbuild 1.6.0-beta.0 by @Timeless0911 in #1267
- chore: use shorter string value for
output.distPathby @Timeless0911 in #1271 - test: fix shims disable test by @Timeless0911 in #1272
- chore(deps): update all non-major dependencies by @renovate[bot] in #1276
- chore: disable lazyCompilation to make mf e2e case stable by @Timeless0911 in #1278
- Release v0.16.0 by @Timeless0911 in #1282
Full Changelog: v0.15.1...v0.16.0
v0.15.1
What's Changed
Bug Fixes 🐞
Document 📖
- docs: link redirect.dts.extension in dts.autoExtension by @fi3ework in #1263
- docs: distinguish watch mode in configuration files by @Timeless0911 in #1265
Other Changes
- chore: supersede strip-ansi with stripVTControlCharacters by @fi3ework in #1261
- chore(deps): update all non-major dependencies by @renovate[bot] in #1262
- chore(deps): update all non-major dependencies by @renovate[bot] in #1264
- Release v0.15.1 by @Timeless0911 in #1266
Full Changelog: v0.15.0...v0.15.1
v0.15.0
Highlights 💡
Preserve JSX
Rslib supports setting the JSX runtime to 'preserve' to leave JSX syntax unchanged without transforming it, which is useful when you expect JSX to be left as is in library development.
See JSX transform - React for more details.
What's Changed
New Features 🎉
- feat: support JSX preserve by @fi3ework in #1244
- feat: support inspect Rslib config by @fi3ework in #1255
Bug Fixes 🐞
Document 📖
- docs: correct rslib mf command in README by @Timeless0911 in #1245
- docs: update examples link by @Timeless0911 in #1246
- docs(zh): translate bundle example heading by @fi3ework in #1248
- docs: specify @storybook/addon-essentials next version by @nyqykk in #1250
- docs(AGENTS.md): refine by @fi3ework in #1251
Other Changes
- chore(deps): update all non-major dependencies by @renovate[bot] in #1253
- chore(deps): bump Rsbuild 1.5.13 by @Timeless0911 in #1256
- Release v0.15.0 by @Timeless0911 in #1259
Full Changelog: v0.14.0...v0.15.0
v0.14.0
Breaking changes 🚨
Config loading
Currently, configuration files are loaded with jiti, which relies on Babel. This approach is relatively slow (at least ~70ms slower compared to native).
In Rslib v0.13.3, we introduced a new CLI option --config-loader native, which uses Node.js's native loader. This approach offers better performance and stricter behavior, but comes with certain requirements:
- Requires Node v22.18+ with built-in TypeScript support
- Import specifiers must include file extensions
- When using TypeScript,
package.jsonmust set"type": "module" - Importing JSON requires
with { type: "json" }
In Rslib v0.14.0, we adjust the default configuration loading behavior. The new default is now --config-loader auto, which:
- First attempts to use the faster native loader
- If that fails, it gracefully falls back to jiti for broader compatibility
This change to 'auto' as the default is part of our long-term plan to transition config loading from jiti to Node.js native.
What's Changed
New Features 🎉
- feat!: config loader default to
'auto'by @Timeless0911 in #1240 - feat(CLI): support
logLevelby @Timeless0911 in #1238
Bug Fixes 🐞
- fix(docs): use
rp-not-docfor rsbuild doc badge by @Timeless0911 in #1236
Other Changes
- chore(deps): update dependency ora to v9 by @renovate[bot] in #1230
- chore(deps): update dependency ubuntu to v24 by @Timeless0911 in #1231
- chore(renovate): ignore
jsdomdue to Node.js version limit by @Timeless0911 in #1233 - chore: update tailwind v4 in test cases by @Timeless0911 in #1232
- chore(deps): bump Rsbuild 1.5.9 by @Timeless0911 in #1234
- chore(deps): update all non-major dependencies by @renovate[bot] in #1235
- chore(deps): bump Rsbuild 1.5.11 by @Timeless0911 in #1241
- test: make test logs clear by @Timeless0911 in #1242
- Release v0.14.0 by @Timeless0911 in #1243
Full Changelog: v0.13.3...v0.14.0
v0.13.3
What's Changed
New Features 🎉
- feat(CLI): add
--config-loaderoption by @chenjiahan in #1225
Performance 🚀
- perf(plugin-dts): require typescript to improve startup performance by @chenjiahan in #1224
Bug Fixes 🐞
Other Changes
- chore: fix critical and high Dependabot alerts by @fi3ework in #1219
- chore: add AGENTS.md by @fi3ework in #1221
- chore(deps): update all non-major dependencies by @renovate[bot] in #1222
- chore(build): prebundle tinyglobby to reduce deps count by @Timeless0911 in #1226
- chore(build): prebundle deps in
rsbuild-plugin-dtsby @Timeless0911 in #1227 - Release v0.13.3 by @Timeless0911 in #1228
Full Changelog: v0.13.2...v0.13.3
v0.13.2
v0.13.1
What's Changed
Bug Fixes 🐞
- fix(dts): tsgo bin path should begin with file protocol in windows by @Timeless0911 in #1211
Document 📖
- docs: add hint for whether to enable
dts.buildby @Timeless0911 in #1212
Other Changes
- chore: bump Rslib and enable tsgo in local by @Timeless0911 in #1210
- chore(deps): bump Rsbuild 1.5.5 by @Timeless0911 in #1213
- chore(deps): update all non-major dependencies by @renovate[bot] in #1214
- chore(workflow): remove experimental typescript setting by @Timeless0911 in #1215
- Release v0.13.1 by @Timeless0911 in #1216
Full Changelog: v0.13.0...v0.13.1
