Skip to content

Releases: web-infra-dev/rslib

v0.5.1

21 Feb 08:24
2820e28
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: warn if declarationDir or outDir is resolved outside project root by @Timeless0911 in #780

Bug Fixes 🐞

  • fix: redirect index file when redirect.dts.extension is enabled by @Timeless0911 in #778

Document 📖

Other Changes

Full Changelog: v0.5.0...v0.5.1

v0.5.0

19 Feb 09:52
b3cf9ea
Compare
Choose a tag to compare

Highlights ✨

This release brings exciting new features and improvements to Rslib:

  • Support DTS Redirect: Rslib now supports to control the redirect of the import paths in output TypeScript declaration files. (#742)

    • redirect.dts.path: Redirect the import path in the DTS output file to the corresponding relative path based on the compilerOptions.paths configured in tsconfig.json.
    // For `compilerOptions.paths` set to `{ "@/*": ["src/*"] }` in `tsconfig.json`
    import { foo } from '@/foo'; // source code of './src/bar.ts' ↓
    import { foo } from './foo'; // expected output of './dist/bar.d.ts'
    
    import { foo } from '@/foo'; // source code of './src/utils/index.ts' ↓
    import { foo } from '../foo'; // expected output './dist/utils/index.d.ts'
    • redirect.dts.extension: Redirect the import path in the DTS output file to the corresponding JavaScript extension which can be resolved to corresponding DTS file.
    // For `.d.mts` TypeScript Declaration files
    import { foo } from './foo'; // source code of './src/bar.ts' ↓
    import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
    
    import { foo } from './foo.ts'; // source code of './src/bar.ts' ↓
    import { foo } from './foo.mjs'; // expected output of './dist/bar.d.mts'
  • Support outBase in Bundleless Mode: When building a project where source files exist across multiple directories with bundleless mode, the output directory structure will be replicated relative to the outBase directory in the output directory, see lib.outBase for more details. (#745)

  • Add Documents about Assets: Documents related to asset module have been added for common scenarios in component library development, see Import static assets, Import SVGR and Import JSON files for more details. (#741)

  • Support pkg.pr.new: With pkg.pr.new, each of commits in main branch will trigger an instant preview release without publishing anything to NPM. This enables users to access features and bug-fixes without the need to wait for release cycles. (#766)

What's Changed

New Features 🎉

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: v0.4.1...v0.5.0

v0.4.1

07 Feb 11:37
36dea47
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat(core): reexport "@rslib/core/types" from "@rsbuild/core/types" by @SoonIter in #739

Bug Fixes 🐞

  • fix(dts): correct tsconfig path not found error message by @fi3ework in #740

Document 📖

Other Changes

  • chore(deps): update dependency @rstack-dev/doc-ui to v1.6.0 by @renovate in #717
  • chore(deps): update dependency rslib to v0.4.0 by @renovate in #718
  • chore(deps): update dependency @rsbuild/plugin-node-polyfill to ^1.3.0 by @renovate in #719
  • chore(deps): update dependency create-rstack to v1.2.0 by @renovate in #722
  • chore(deps): update dependency nx to ^20.4.0 by @renovate in #723
  • chore(deps): update dependency rsbuild-plugin-publint to ^0.3.0 by @renovate in #724
  • ci(corepack): fix corepack key id mismatch by @Timeless0911 in #728
  • chore(deps): update all patch dependencies by @renovate in #726
  • chore(deps): update dependency ora to v8.2.0 by @renovate in #727
  • chore(deps): update dependency vitest to v3.0.5 [security] by @renovate in #731
  • chore(deps): update pnpm 10.2.0 by @Timeless0911 in #733
  • chore: update Node.js to v23.7.0 in .nvmrc for development by @Timeless0911 in #734
  • chore(deps): update all patch dependencies by @renovate in #736
  • Release v0.4.1 by @Timeless0911 in #743

New Contributors

Full Changelog: v0.4.0...v0.4.1

v0.4.0

27 Jan 08:27
14a0e06
Compare
Choose a tag to compare

Highlights ✨

This release brings exciting new features and improvements to Rslib:

  • Import Static Assets: Rslib now supports importing static assets like images (including SVG to React component conversion), fonts, audio, and video directly into your library code. This feature ensures correct outputs in both bundle and bundleless modes, making it easier than ever to develop libraries with static assets. (#684 #705)
  • Enhanced Bundleless Mode:
    • Supports emitting CSS source maps in bundleless mode. (#698)
    • Supports using Stylus within your bundleless libraries, expanding your styling options. (#707)
    • Supports adding banners and footers to CSS files in bundleless mode. (#712)

What's Changed

New Features 🎉

Bug Fixes 🐞

Document 📖

  • docs(QA): add how to external module in DTS by @fi3ework in #706

Other Changes

New Contributors

Full Changelog: v0.3.2...v0.4.0

v0.3.2

17 Jan 09:57
97c29aa
Compare
Choose a tag to compare

What's Changed

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: v0.3.1...v0.3.2

v0.3.1

09 Jan 12:04
290040a
Compare
Choose a tag to compare

What's Changed

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: v0.3.0...v0.3.1

v0.3.0

06 Jan 11:07
d65c83f
Compare
Choose a tag to compare

What's Changed

Highlights ✨

This release brings some improvements and new features, addressing common scenarios and enhancing the overall user experience:

  • Enhanced Style File Redirection: Support for redirect.style.path and redirect.style.extension to configure the redirection of the import paths of style files. (#618)
  • Optimized JavaScript File Redirection: Fix some cases about redirection of the import paths of output JavaScript files. (#615 #624)
  • Improved Bundleless Mode:
    • Support handling file additions and removals in watch mode. (#642)
    • Refined source.entry configuration, defaulting to src/** and excluding .d.ts files from being treated as entry points. (#636 #647)

Breaking changes 🚨

Please note the following changes that may require adjustments to your configurations:

  • Boolean values are no longer supported for redirect.style, see the documentation of redirect.style for more details. (#618)
  • The autoExternal configuration is no longer effective in bundleless mode, see the documentation of autoExternal for more details. (#624)

New Features 🎉

  • feat!: disable autoExternal in bundleless mode and only redirect request not in node_modules by @Timeless0911 in #624
  • feat!: support redirect.style.path and redirect.style.extension by @SoonIter in #618
  • feat: entry default to src/** in bundleless mode by @Timeless0911 in #647
  • feat: throw error when no configuration match --lib option by @Timeless0911 in #648

Bug Fixes 🐞

  • fix: do not treat .d.ts as entry by @fi3ework in #636
  • fix: detect possible glob pattern in bundle more by @fi3ework in #634
  • fix: handle add and unlink file in bundleless mode by @fi3ework in #642

Document 📖

  • docs: add how to skip the preprocessing of less/scss files by @Timeless0911 in #623

Other Changes

Full Changelog: v0.2.2...v0.3.0

v0.2.2

26 Dec 11:11
cc02815
Compare
Choose a tag to compare

What's Changed

Other Changes

Full Changelog: v0.2.1...v0.2.2

v0.2.1

26 Dec 09:30
988c684
Compare
Choose a tag to compare

What's Changed

Bug Fixes 🐞

Other Changes

Full Changelog: v0.2.0...v0.2.1

v0.2.0

24 Dec 10:37
002d4d4
Compare
Choose a tag to compare

What's Changed

Highlights ✨

Comparing with 0.1.0, we have fixed many bugs and added numerous features for common scenarios, including but not limited to:

  • Enhanced support for resolving external modules, improving the redirect of paths for bundleless mode. See lib.redirect. (#535)
  • Introduced support for loading .env files. See Environment Variables. (#518)
  • Optimized code compression to retain only essential comments, resulting in smaller output sizes. (#522)
  • Added support for watching rslib.config to trigger rebuilds. (#489)
  • Improved documentation and completed the translation of the Chinese documentation. See https://lib.rsbuild.dev/zh/index.

Breaking changes 🚨

  • rslib mf dev has been changed to rslib mf-dev command in #590, checkout the documentation of mf-dev for more details.

New Features 🎉

  • feat(css): support css asset in bundleless mode and esm/cjs by @SoonIter in #582
  • feat!: support --lib param of mf-dev command by @Timeless0911 in #590

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: v0.1.5...v0.2.0