Releases: web-infra-dev/rslib
v0.19.0
Highlights 💡
New JavaScript API
This release introduces a new, comprehensive JavaScript API for Rslib.
Caution
This is a Breaking Change. The previously exposed informal API has been removed. You can switch to the new JavaScript API and refer to the docs below to re-integrate.
See the API docs for details:
Usage
- Install Rslib: install the
@rslib/corepackage:
npm add @rslib/core -D- Create an Rslib instance: call the createRslib method to create an Rslib instance:
import { createRslib } from '@rslib/core';
const rslib = await createRslib();- Call Rslib instance methods: use the rslib.build method which will build production outputs:
await rslib.build();Advanced ESM Output
In previous versions, Rslib integrated Rspack's EsmLibraryPlugin through an experimental configuration of experiments.advancedEsm, aiming to optimize the quality of ESM outputs. Now, we are pleased to announce that this plugin has been stabilized.
In this release, the EsmLibraryPlugin is enabled by default by setting experiments.advancedEsm to true in bundle mode. Developers can directly obtain ESM output that is high-quality, more friendly to static analysis, and supports code splitting without any additional configuration.
Better Rstest Integration
Rslib now supports seamless integration with Rstest.
By using the official @rstest/adapter-rslib, you can directly reuse your Rslib build configurations (such as resolve.alias and source.define) within Rstest. This enables zero-config testing for Rslib projects, ensuring your test environment perfectly mirrors your build environment while eliminating the overhead of maintaining duplicate configurations.
// rstest.config.ts
import { defineConfig } from '@rstest/core';
import { withRslibConfig } from '@rstest/adapter-rslib';
export default defineConfig({
extends: withRslibConfig({}),
// Additional Rstest-specific configurations
// ...
});More details: https://rstest.rs/guide/integration/rslib
What's Changed
New Features 🎉
- feat(create-rslib): use
happy-dominstead ofjsdomby @9aoy in #1412 - feat!: add JavaScript API and enhance CLI behaviour by @Timeless0911 in #1394
- feat(create-rslib): use
@rstest/adapter-rslibby @9aoy in #1415 - feat!: enable advanced esm by default by @Timeless0911 in #1413
Other Changes
- chore(deps): update all non-major dependencies by @renovate[bot] in #1411
- chore(deps): update all non-major dependencies by @renovate[bot] in #1414
- Release v0.19.0 by @Timeless0911 in #1416
Full Changelog: v0.18.6...v0.19.0
v0.18.6
What's Changed
New Features 🎉
- feat(CLI): add
rslib-nodeprocess title by @Timeless0911 in #1406
Bug Fixes 🐞
- fix: should throw error when custom config file not found by @9aoy in #1403
- fix(CLI): ensure consistent spacing before the greeting message by @Timeless0911 in #1407
- fix(CLI): simplify build error logs by @Timeless0911 in #1408
Other Changes
- chore(deps): update dependency storybook to v10.1.10 [security] by @renovate[bot] in #1400
- chore(deps): update all non-major dependencies by @renovate[bot] in #1402
- chore(deps): bump Rsbuild 1.7.0-beta.1 by @Timeless0911 in #1409
- Release v0.18.6 by @Timeless0911 in #1410
Full Changelog: v0.18.5...v0.18.6
v0.18.5
What's Changed
Document 📖
- docs: improve documentation for
dts.aliasby @Timeless0911 in #1391 - docs: add documentation for more resolve options by @Timeless0911 in #1392
Other Changes
- test: replace
onDevCompileDonewithonAfterDevCompileby @Timeless0911 in #1393 - chore(deps): update all non-major dependencies by @renovate[bot] in #1396
- chore(deps): update dependency @rsbuild/core to v1.7.0-beta.0 by @chenjiahan in #1398
- Release v0.18.5 by @Timeless0911 in #1399
Full Changelog: v0.18.4...v0.18.5
v0.18.4
What's Changed
New Features 🎉
- feat: improve bundleless file size print by @Timeless0911 in #1386
Bug Fixes 🐞
- fix: disable split chunks for umd and iife output format by @Timeless0911 in #1378
- fix: ignore specific system files in bundleless entry config by @Timeless0911 in #1384
Other Changes
- chore(deps): update actions/setup-node digest to 395ad32 by @renovate[bot] in #1381
- chore(deps): update actions/checkout digest to 8e8c483 by @renovate[bot] in #1380
- chore(deps): update all non-major dependencies by @renovate[bot] in #1382
- chore(deps): bump Rspress 2.0.0-rc.2 by @Timeless0911 in #1383
- test: use rstest es module outputs by @9aoy in #1385
- chore(deps): bump Rsbuild 1.6.14 by @Timeless0911 in #1387
- chore(deps): update actions/checkout digest to 8e8c483 by @renovate[bot] in #1388
- Release v0.18.4 by @Timeless0911 in #1389
Full Changelog: v0.18.3...v0.18.4
v0.18.3
What's Changed
New Features 🎉
Bug Fixes 🐞
- fix: preserve original extension when extension redirection is disabled by @Timeless0911 in #1369
- fix(dts): check for existence of target path when redirect extension by @Timeless0911 in #1374
Other Changes
- chore(deps): update all non-major dependencies by @renovate[bot] in #1370
- chore(deps): update dependency express to v5.2.0 [security] by @renovate[bot] in #1372
- chore: remove pnpm trust policy by @Timeless0911 in #1373
- chore(deps): bump Rsbuild 1.6.12 by @Timeless0911 in #1375
- Release v0.18.3 by @Timeless0911 in #1376
Full Changelog: v0.18.2...v0.18.3
v0.18.2
What's Changed
New Features 🎉
- feat: default exclude
@types/reactfrom dts bundle by @Timeless0911 in #1365
Bug Fixes 🐞
- fix: clean declaration maps before the build starts by @Timeless0911 in #1363
Other Changes
- test: refactor dts tests to split into multiple test files by @Timeless0911 in #1364
- chore(deps): bump Rsbuild 1.6.9 by @Timeless0911 in #1366
- Release v0.18.2 by @Timeless0911 in #1367
Full Changelog: v0.18.1...v0.18.2
v0.18.1
What's Changed
Bug Fixes 🐞
- fix(dts): gracefully shutdown when panic by @Timeless0911 in #1343
- fix: use native plugin to handle hashbang and react directives by @fi3ework in #1331
- fix: should only make entry doppelganger in non-advanced ESM by @fi3ework in #1352
- fix(create-rslib): use current package manager in templates by @Timeless0911 in #1354
- fix(create-rslib): merge AGENTS.md in different tools by @Timeless0911 in #1356
- fix: emit correct warning message when no entry found in bundleless mode by @Timeless0911 in #1359
Document 📖
- docs: transparent nav at top by @Timeless0911 in #1341
- docs: refactor section headers by @Timeless0911 in #1342
- docs: remove HomeBackground and navTransparent hack by @Timeless0911 in #1344
- docs: twoslash cache false by @Timeless0911 in #1350
Other Changes
- test: fix flaky watching file cases by @Timeless0911 in #1345
- chore(deps): update all non-major dependencies by @renovate[bot] in #1346
- chore(deps): update actions/checkout digest to 93cb6ef by @renovate[bot] in #1347
- test: recover assets with public path tests by @Timeless0911 in #1349
- chore(deps): update glob to solve security vulnerabilities by @Timeless0911 in #1348
- test: simplify cli watch test by @Timeless0911 in #1351
- chore(deps): update Rspress v2.0.0-rc.1 by @Timeless0911 in #1353
- chore(deps): update actions/checkout action to v6 by @renovate[bot] in #1357
- chore(deps): update mf packages and rm unused packages in trustPolicyExclude by @Timeless0911 in #1358
- chore(deps): update all non-major dependencies by @renovate[bot] in #1361
- Release v0.18.1 by @Timeless0911 in #1362
Full Changelog: v0.18.0...v0.18.1
v0.18.0
Highlights 💡
Enable persistent build cache by default
Rslib enables Rspack's persistent build cache by default, allowing it to reuse the cached results instead of rebuilding from scratch, which can significantly reduce build time for large projects.
// rslib.config.ts
export default {
performance: {
buildCache: true,
},
};More details:
What's Changed
New Features 🎉
- feat: enable buildCache by default by @Timeless0911 in #1334
Document 📖
- docs: update some configurations of Rspress v2 by @Timeless0911 in #1339
Other Changes
- chore(deps): bump Rslib 0.17.2 by @Timeless0911 in #1337
- security: enable pnpm's no-downgrade trustPolicy by @Timeless0911 in #1333
- chore(deps): update all non-major dependencies by @renovate[bot] in #1338
- Release v0.18.0 by @Timeless0911 in #1340
Full Changelog: v0.17.2...v0.18.0
v0.17.2
What's Changed
New Features 🎉
Bug Fixes 🐞
- fix: do not modify mf’s output config by @fi3ework in #1322
- fix: upgrade [email protected] to fix lazy compilation issue by @2heal1 in #1327
- fix(create-rslib): support repeatable
—toolsflag by @fi3ework in #1328
Document 📖
- docs: remove complex twoslash code block by @Timeless0911 in #1302
- docs: assets output filename and distPath by @Timeless0911 in #1332
Other Changes
- test: set max workers number by @Timeless0911 in #1323
- chore(deps): bump Rstest 0.6.2 by @Timeless0911 in #1324
- chore(deps): update all non-major dependencies by @renovate[bot] in #1326
- chore(build): use advanced ESM by @Timeless0911 in #1325
- chore(deps): bump Rsbuild 1.6.6 by @Timeless0911 in #1335
- Release v0.17.2 by @Timeless0911 in #1336
Full Changelog: v0.17.1...v0.17.2
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