Skip to content

Releases: web-infra-dev/rslib

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

v0.18.5

18 Dec 09:54
3b9e5c2

Choose a tag to compare

What's Changed

Document 📖

Other Changes

Full Changelog: v0.18.4...v0.18.5

v0.18.4

09 Dec 12:13
4dc582e

Choose a tag to compare

What's Changed

New Features 🎉

Bug Fixes 🐞

Other Changes

Full Changelog: v0.18.3...v0.18.4

v0.18.3

03 Dec 07:48
020f528

Choose a tag to compare

What's Changed

New Features 🎉

  • feat(create-rslib): bump Storybook to v10 by @renovate[bot] in #1309

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

Full Changelog: v0.18.2...v0.18.3

v0.18.2

25 Nov 11:48
1933c3e

Choose a tag to compare

What's Changed

New Features 🎉

Bug Fixes 🐞

Other Changes

Full Changelog: v0.18.1...v0.18.2

v0.18.1

24 Nov 08:24
403b709

Choose a tag to compare

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 📖

Other Changes

Full Changelog: v0.18.0...v0.18.1

v0.18.0

17 Nov 08:18
38ad58d

Choose a tag to compare

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 🎉

Document 📖

Other Changes

Full Changelog: v0.17.2...v0.18.0

v0.17.2

13 Nov 13:27
0caffdb

Choose a tag to compare

What's Changed

New Features 🎉

  • feat: log a flag to mark first compile done in watch mode by @fi3ework in #1330

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: v0.17.1...v0.17.2

v0.17.1

05 Nov 13:30
30f4279

Choose a tag to compare

What's Changed

New Features 🎉

Bug Fixes 🐞

Other Changes

Full Changelog: v0.17.0...v0.17.1