v2.0.5
v2.0.5
Release Notes
Highlights
Support import.meta.glob
Rspack now supports import.meta.glob, a file-system import API already available in Vite and Turbopack. We chose to align with this ecosystem behavior.
const pages = import.meta.glob('./pages/**/*.tsx', {
eager: true,
import: 'default',
query: { layout: 'docs' },
base: './pages',
});
More controllable CSS module parsing
CSS modules can now control parsing for @import, animations, custom idents, and dashed idents through module.parser, so projects can match existing CSS Modules behavior more closely while migrating to Rspack.
export default {
module: {
parser: {
'css/module': {
import: true,
animation: true,
customIdents: true,
dashedIdents: true,
},
},
},
};
What's Changed
New Features 🎉
- feat(css): add supports import, animation, customIdents, and dashedIdents for CSS by @intellild in https://github.com/web-infra-dev/rspack/pull/14076
- feat: optimize generated getter for const export by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14045
- feat: implement import.meta.glob by @intellild in https://github.com/web-infra-dev/rspack/pull/13998
- feat: support import option for import.meta.glob by @intellild in https://github.com/web-infra-dev/rspack/pull/14123
- feat: support more import.meta.glob options by @intellild in https://github.com/web-infra-dev/rspack/pull/14129
- feat: inline const for default export by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14117
- feat: optimize getter for const export default by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14175
Performance 🚀
- perf: extend release opt-level s for cold-path crates by @hardfist in https://github.com/web-infra-dev/rspack/pull/14085
- perf: remove unnecessary async_trait usage by @hardfist in https://github.com/web-infra-dev/rspack/pull/14041
- perf: remove unused graph roots edge sorting by @intellild in https://github.com/web-infra-dev/rspack/pull/14101
- perf: reduce release binary size by @hardfist in https://github.com/web-infra-dev/rspack/pull/14103
- perf: reduce release binding size by @hardfist in https://github.com/web-infra-dev/rspack/pull/14108
- perf(javascript): reduce parser allocations by @hardfist in https://github.com/web-infra-dev/rspack/pull/14124
- perf: optimize find graph roots by @intellild in https://github.com/web-infra-dev/rspack/pull/14106
- perf: content into_string_lossy by @SyMind in https://github.com/web-infra-dev/rspack/pull/14121
- perf(core): use dense storage for dependency connections by @hardfist in https://github.com/web-infra-dev/rspack/pull/14148
- perf(resolver): reuse precomputed hash from rspack-resolver dependencies by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14120
- perf(javascript): avoid cloning exports info during usage analysis by @hardfist in https://github.com/web-infra-dev/rspack/pull/14157
Bug Fixes 🐞
- fix(rsc): skip manifest runtime for worker entries by @SyMind in https://github.com/web-infra-dev/rspack/pull/14068
- fix: annotate generated JSON.parse as pure by @hardfist in https://github.com/web-infra-dev/rspack/pull/14110
- fix(rslib): align isolated dts diagnostics by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/14143
- fix(rspack_watcher): keep mtime baseline persistent across watch() cycles by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14077
- fix(esm-library): split runtime chunk for async chunks by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14142
- fix: require swc helpers 0.5.22 by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14160
- fix(esm-library): move async runtime split logic by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14159
- fix(cli): block prototype-pollution payloads in --env parsing by @stormslowly in https://github.com/web-infra-dev/rspack/pull/14165
- fix: derive modern-module require external type from target by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14174
- fix: update peer dependency of @swc/helpers to ^0.5.23 by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14176
- fix: resolve external type in esm rendering by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14178
- fix: compat es5 for define property getters runtime by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14177
- fix(rstest): inject require.resolve origin by @9aoy in https://github.com/web-infra-dev/rspack/pull/14162
- fix(rstest): support new runtime template by @9aoy in https://github.com/web-infra-dev/rspack/pull/14181
Document 📖
- docs: add CSS module parser options by @intellild in https://github.com/web-infra-dev/rspack/pull/14096
- docs: split module config docs by @intellild in https://github.com/web-infra-dev/rspack/pull/14099
- docs: clarify module parser and generator options by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14111
- docs: align blog authors display with other rstack wbesite by @elecmonkey in https://github.com/web-infra-dev/rspack/pull/14125
- docs: invite @elecmonkey to Rspack core team by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14114
- docs: fix CSS module defaults by @intellild in https://github.com/web-infra-dev/rspack/pull/14136
- docs: document loader peer dependencies by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14137
- docs: document plugin peer dependencies by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14139
- docs(website): upgrade Tailwind CSS v4 with Rsbuild plugin by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14150
Other Changes
- test: remove jest-snapshot from test tools by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14112
- chore(deps): reduce peer dependency installs by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14115
- test: add swc-loader build module graph benchmark by @hardfist in https://github.com/web-infra-dev/rspack/pull/14128
- chore(deps): update patch npm dependencies by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14132
- chore(deps): update dependency @module-federation/runtime-tools to v2.5.0 by @renovate[bot] in https://github.com/web-infra-dev/rspack/pull/14133
- test: satisfy socket.dev security by @intellild in https://github.com/web-infra-dev/rspack/pull/14138
- chore: upgrade swc_core from 66 to 67 by @hardfist in https://github.com/web-infra-dev/rspack/pull/14135
- revert: "feat: optimize generated getter for const export" by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14151
- revert: "revert: "feat: optimize generated getter for const export"" by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14153
- Revert "chore: upgrade swc_core from 66 to 67" by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14168
- Revert "fix: require swc helpers 0.5.22" by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14171
- chore(deps): upgrade pnpm to 11.3.0 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/14184
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.4...v2.0.5