Skip to content

Releases: web-infra-dev/rslib

v0.20.1

25 Mar 08:50
b3fadd5

Choose a tag to compare

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: v0.20.0...v0.20.1

v0.20.0

10 Mar 11:31
7b85274

Choose a tag to compare

Breaking changes 🚨

Drop Node.js 18 support

Rslib v0.20 requires Node.js 20.19+ or 22.12+, Node.js 18 is no longer supported.

Rsbuild / Rspack v2

Rslib v0.20 now depends on beta version of @rsbuild/core v2 and @rspack/core v2. If you use custom Rsbuild / Rspack configurations or plugins, you may need to make corresponding adjustments.

See the Rsbuild v2 upgrade guide for all breaking changes.

Deprecate experiments.advancedEsm

experiments.advancedEsm is now deprecated and effectively ignored. Advanced ESM behavior is the default in both bundle and bundleless mode.

What you need to do:

  • Remove experiments.advancedEsm from your config
  • Verify the output behaviour

Rename type StartServerResult

The exported type StartServerResult has been renamed to StartDevServerResult.

What's Changed

New Features 🎉

  • feat!: upgrade Rsbuild to v2 and deprecate experiments.advancedEsm by @Timeless0911 in #1513
  • feat: updates the default contenthash length in filenames from 8 to 10 by @Timeless0911 in #1515

Bug Fixes 🐞

  • fix: validate glob entry correctness in bundle mode by @9aoy in #1512
  • fix(core): allow preserve jsx in bundleless mode to coexist with bundle mode by @Timeless0911 in #1523

Document 📖

Other Changes

Full Changelog: v0.19.6...v0.20.0

v0.19.6

14 Feb 08:03
2015a04

Choose a tag to compare

What's Changed

Document 📖

Other Changes

Full Changelog: v0.19.5...v0.19.6

v0.19.5

05 Feb 06:48
824ba7c

Choose a tag to compare

What's Changed

Document 📖

Other Changes

Full Changelog: v0.19.4...v0.19.5

v0.19.4

30 Jan 13:28
ff14868

Choose a tag to compare

What's Changed

New Features 🎉

  • feat(create-rslib): add Rspress documentation tool templates by @SoonIter in #1459

Bug Fixes 🐞

  • fix(cli): exit with non-zero code when it fails to start by @Timeless0911 in #1449
  • fix(shims): import.meta.url not being removed by tree-shaking by @sylingd in #1463
  • fix(create-rslib): remove rspress-js template by @Timeless0911 in #1464
  • fix(create-rslib): support dynamic package name in rspress template by @Timeless0911 in #1465
  • fix(create-rslib): improve template argument parsing and defaults by @Timeless0911 in #1467

Document 📖

Other Changes

New Contributors

Full Changelog: v0.19.3...v0.19.4

v0.19.3

21 Jan 07:29
d63944d

Choose a tag to compare

What's Changed

Document 📖

Other Changes

Full Changelog: v0.19.2...v0.19.3

v0.19.2

12 Jan 07:53
a1e425e

Choose a tag to compare

What's Changed

New Features 🎉

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: v0.19.1...v0.19.2

v0.19.1

31 Dec 08:51
1163e85

Choose a tag to compare

What's Changed

Document 📖

Other Changes

Full Changelog: v0.19.0...v0.19.1

v0.19.0

29 Dec 06:59
1df12c7

Choose a tag to compare

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

  1. Install Rslib: install the @rslib/core package:
npm add @rslib/core -D
  1. Create an Rslib instance: call the createRslib method to create an Rslib instance:
import { createRslib } from '@rslib/core';

const rslib = await createRslib();
  1. 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 🎉

Other Changes

Full Changelog: v0.18.6...v0.19.0

v0.18.6

24 Dec 12:43
bbee075

Choose a tag to compare

What's Changed

New Features 🎉

Bug Fixes 🐞

Other Changes

Full Changelog: v0.18.5...v0.18.6