Releases: web-infra-dev/rslib
v0.5.4
What's Changed
Bug Fixes 🐞
- fix:
output.filenameHash
does not take effect on JavaScript files by @Timeless0911 in #818 - fix: should check lib array non-empty by @Timeless0911 in #820
Other Changes
- chore(deps): update all patch dependencies by @renovate in #811
- chore(deps): update dependency @module-federation/enhanced to ^0.10.0 by @renovate in #815
- chore(deps): update dependency @module-federation/rsbuild-plugin to ^0.10.0 by @renovate in #816
- refactor: optimize dts logs/docs with
declaration files
keyword by @Timeless0911 in #817 - chore(deps): update all patch dependencies by @renovate in #822
- chore(deps): update dependency @ast-grep/napi to ^0.36.0 by @renovate in #824
- chore(deps): update dependency @playwright/test to v1.51.0 by @renovate in #825
- chore(deps): update Rspress to v2.0.0-alpha.1 by @Timeless0911 in #826
- chore(deps): update dependency nx to ^20.5.0 by @renovate in #827
- chore(deps): update dependency zx to ^8.4.0 - autoclosed by @renovate in #828
- Release v0.5.4 by @Timeless0911 in #832
Full Changelog: v0.5.3...v0.5.4
v0.5.3
What's Changed
Bug Fixes 🐞
- fix(svgr):
?url
query should work in bundle mode by @SoonIter in #804 - fix(bundleless, css): in
target: 'node'
, empty js files(css transform) should be deleted by @SoonIter in #809
Document 📖
- docs: modify description of
resolve.alias
by @Timeless0911 in #805
Other Changes
- chore(deps): update all patch dependencies by @renovate in #802
- chore(deps): update dependency @microsoft/api-extractor to ^7.51.0 by @renovate in #807
- chore(deps): update storybook monorepo to ^8.6.0 by @renovate in #808
- chore(deps): update @rsbuild/core 1.2.13 by @SoonIter in #810
- chore(deps): update dependency core-js-pure to ^3.41.0 by @renovate in #812
- chore(deps): update dependency typescript to ^5.8.2 by @renovate in #813
- Release v0.5.3 by @Timeless0911 in #814
Full Changelog: v0.5.2...v0.5.3
v0.5.2
What's Changed
New Features 🎉
- feat: support bundle DTS of multiple entries by @Timeless0911 in #793
Bug Fixes 🐞
- fix(shims): CJS shims should only affect chunk assets by @fi3ework in #787
- fix: revert dtsEmitPath generate logic to respect
output.distPath.root
by @Timeless0911 in #788
Document 📖
- docs: enhance entry exclusion in bundleless mode by @Timeless0911 in #789
- docs: add SVGR in React solution by @Timeless0911 in #795
- docs: correct
externalHelpers
highlights by @chenjiahan in #796 - docs: add
README.zh-CN.md
and update some chapters by @Timeless0911 in #797
Other Changes
- chore(deps): update dependency @module-federation/enhanced to ^0.9.0 by @renovate in #790
- chore(deps): update dependency create-rstack to v1.3.0 by @renovate in #792
- chore(deps): update dependency @module-federation/rsbuild-plugin to ^0.9.0 by @renovate in #791
- chore(deps): update all patch dependencies by @renovate in #782
- chore(deps): update dependency storybook-addon-rslib to v1 by @renovate in #798
- chore(deps): update dependency storybook-react-rsbuild to v1 by @renovate in #799
- chore: modify
README.zh-CN.md
and update storybook monorepo to ^8.6.0 by @renovate in #800 - Release v0.5.2 by @Timeless0911 in #801
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
New Features 🎉
- feat: warn if
declarationDir
oroutDir
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 📖
- docs: modify examples of
redirect.dts.extension
by @Timeless0911 in #771
Other Changes
- chore(deps): update dependency @changesets/cli to ^2.28.0 by @renovate in #772
- chore(deps): update dependency rslib to v0.5.0 by @renovate in #773
- chore(deps): update all patch dependencies by @renovate in #776
- test: correct build watch test by @Timeless0911 in #777
- Release v0.5.1 by @Timeless0911 in #784
Full Changelog: v0.5.0...v0.5.1
v0.5.0
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 intsconfig.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'
- redirect.dts.path: Redirect the import path in the DTS output file to the corresponding relative path based on the
-
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 theoutBase
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 🎉
- feat: support DTS redirect by @Timeless0911 in #742
- feat: support outBase config by @fi3ework in #745
Bug Fixes 🐞
- fix: windows issue in dts redirect by @Timeless0911 in #746
- fix: clean dts distPath earlier by @Timeless0911 in #752
- fix: correct detect transformed module external request by @fi3ework in #754
- fix(bundleless): only try to redirect files under outBase dir by @fi3ework in #760
- fix(CI): should filter workspaces in pkg-pr-new by @Timeless0911 in #767
Document 📖
- docs: display GitHub button on homepage by @chenjiahan in #751
- docs(assets): add assets, json, svgr usage document by @SoonIter in #741
- docs: add why Rslib chapter by @Timeless0911 in #755
- docs: add bundleless externals note by @Timeless0911 in #763
Other Changes
- chore(CI): modify test ci yaml to make pr merge correctly by @Timeless0911 in #747
- chore(deps): update dependency @microsoft/api-extractor to ^7.50.0 by @renovate in #749
- chore(deps): update all patch dependencies by @renovate in #748
- chore(deps): update dependency prettier to ^3.5.0 by @renovate in #750
- chore(deps): update all patch dependencies by @renovate in #753
- chore(deps): update all patch dependencies by @renovate in #756
- chore(deps): update all patch dependencies by @renovate in #757
- chore(deps): update dependency @ast-grep/napi to ^0.35.0 by @renovate in #758
- chore(CI): support pkg.pr.new by @Timeless0911 in #766
- chore(deps): update all patch dependencies by @renovate in #765
- chore(deps): update dependency rspress to v1.42.0 by @renovate in #768
- chore(deps): update dependency preact to ^10.26.2 by @renovate in #769
- Release v0.5.0 by @Timeless0911 in #770
Full Changelog: v0.4.1...v0.5.0
v0.4.1
What's Changed
New Features 🎉
Bug Fixes 🐞
Document 📖
- docs: minor edits to en docs by @58bits in #721
- docs: patch necessary changes by @Timeless0911 in #725
- docs: remove placeholder docs by @Timeless0911 in #732
- docs: update rspress 1.41.0 and enable codeBlocks search by @SoonIter in #735
- docs: add bundleless mode img and polish the some words by @SoonIter in #737
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
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:
What's Changed
New Features 🎉
- feat: support asset module by @SoonIter in #684
- feat(asset): support svgr exportType usage by @SoonIter in #705
- feat: support stylus in bundleless mode by @Timeless0911 in #707
- feat: support banner and footer in bundleless emitted css by @Timeless0911 in #712
Bug Fixes 🐞
- fix: emit css source map in bundleless mode by @coderbaozi in #698
- fix: use pre hook order to promise dts task by @Timeless0911 in #702
- fix: warn duplicate entries in bundleless mode by @Timeless0911 in #715
Document 📖
Other Changes
- chore(CI): lint documentation heading case by @chenjiahan in #696
- chore(deps): update all patch dependencies by @renovate in #697
- test: add tailwindcss bundle false test case by @SoonIter in #699
- chore(deps): update rsbuild by @renovate in #701
- chore(deps): update Rsbuild 1.2.0 and vitest 3.0.3 by @renovate in #700
- chore(deps): update all patch dependencies by @renovate in #704
- chore(deps): update all patch dependencies by @renovate in #708
- chore(deps): update dependency @playwright/test to v1.50.0 by @renovate in #709
- chore(deps): update dependency commander to ^13.1.0 by @renovate in #710
- chore(deps): update dependency @rsbuild/core to ~1.2.3 by @renovate in #713
- Release v0.4.0 by @Timeless0911 in #716
New Contributors
- @coderbaozi made their first contribution in #698
Full Changelog: v0.3.2...v0.4.0
v0.3.2
What's Changed
Bug Fixes 🐞
- fix: only treat files within context as source file by @fi3ework in #677
- fix: validate entry type by @Timeless0911 in #685
Document 📖
- docs: unify title capitalization style by @chenjiahan in #671
Other Changes
- chore(deps): update all patch dependencies by @renovate in #672
- chore(deps): update dependency create-rstack to v1.1.0 by @renovate in #673
- chore(deps): update dependency memfs to ^4.17.0 by @renovate in #675
- chore: remove unused
@rslib/core
to avoid nx cache error by @Timeless0911 in #676 - chore: add type check for test files by @fi3ework in #681
- test(redirect): add 3rd packages css test by @SoonIter in #687
- chore(deps): update all patch dependencies by @renovate in #688
- chore(deps): update dependency rspress to v1.40.0 by @renovate in #691
- chore(deps): update dependency fs-extra to ^11.3.0 by @renovate in #690
- chore(deps): update dependency @testing-library/react to ^16.2.0 by @renovate in #689
- chore(deps): update storybook monorepo to ^8.5.0 by @renovate in #692
- chore(deps): update dependency vitest to v3 by @renovate in #693
- Release v0.3.2 by @Timeless0911 in #694
Full Changelog: v0.3.1...v0.3.2
v0.3.1
What's Changed
Bug Fixes 🐞
- fix: user externals should have higher priority by @fi3ework in #653
- fix: validate entry correctness in bundle mode by @fi3ework in #659
- fix: edge case of dts RegExp by @Timeless0911 in #668
Document 📖
- docs: introduce the different default values between Rslib and Rsbuild by @Timeless0911 in #651
- docs: how to migrate from existing projects by @Timeless0911 in #658
Other Changes
- chore(deps): update dependency rslib to v0.3.0 by @renovate in #650
- chore: remove manually d.ts excluding by @fi3ework in #654
- chore: add jsDoc for more configurations by @Timeless0911 in #657
- chore(deps): bump pnpm v10 by @Timeless0911 in #661
- chore(deps): update all patch dependencies by @renovate in #662
- chore(deps): update dependency @microsoft/api-extractor to ^7.49.1 by @renovate in #663
- chore(deps): update dependency core-js-pure to ^3.40.0 by @renovate in #664
- chore(deps): update dependency @module-federation/storybook-addon to v4 by @renovate in #665
- chore(deps): update dependency jsdom to v26 by @renovate in #666
- chore(infra): add VSCode recommendations by @Timeless0911 in #667
- Release v0.3.1 by @Timeless0911 in #669
Full Changelog: v0.3.0...v0.3.1
v0.3.0
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
andredirect.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:
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
andredirect.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
- chore(deps): update all patch dependencies by @renovate in #628
- chore(deps): update all patch dependencies by @renovate in #639
- chore: bump Rsbuild 1.2.0-alpha.0 by @Timeless0911 in #640
- chore(deps): update dependency @types/lodash to ^4.17.14 by @renovate in #645
- chore(deps): update dependency commander to v13 by @renovate in #646
- Release v0.3.0 by @Timeless0911 in #649
Full Changelog: v0.2.2...v0.3.0