See Announcing Rspack 1.3 for more details.
Breaking Changes 💡
Rsbuild dev server no longer sets Access-Control-Allow-Origin: *
header to all requests by default. This is the same default behavior as esbuild and Vite, which prevents any website from sending any requests to the dev server.
It is recommended to set up trusted origins via server.cors
, see the server.cors documentation for more details.
See also:
- esbuild: GHSA-67mh-4wv8-2f99
- Vite: GHSA-vg6x-rcgg-rjx6
What's Changed
New Features 🎉
- feat(deps): update Rspack to 1.3.0-beta.0 by @chenjiahan in #4816
- feat: add integrity support for dynamic imports by @chenjiahan in #4817
- feat(plugin-preact): update swc plugin to v7 by @renovate in #4695
- feat: improve restarting experience by @chenjiahan in #4829
- feat: expose
context.action
property by @chenjiahan in #4831 - feat(security): add warnings for defining
process.env
by @chenjiahan in #4835 - feat: improve build error messages by @chenjiahan in #4838
- feat(css): add support for raw CSS imports by @chenjiahan in #4841
- feat(plugin-sass): add support for raw query by @chenjiahan in #4843
- feat(plugin-less): add support for raw query by @chenjiahan in #4844
- feat(plugin-stylus): add support for raw query by @chenjiahan in #4845
- feat: add types for raw imports of CSS preprocessors by @chenjiahan in #4846
- feat(css): add support for inline CSS imports by @chenjiahan in #4849
- feat(plugin-sass): add support for inline query by @chenjiahan in #4856
- feat(plugin-less): add support for inline query by @chenjiahan in #4859
- feat(plugin-stylus): add support for inline query by @chenjiahan in #4860
- feat(plugin-stylus): add
includeCSS
option type and JSDoc by @chenjiahan in #4862 - feat(deps): update Rspack to v1.3.0-beta.1 by @chenjiahan in #4866
- feat(asset): add support for raw query by @chenjiahan in #4869
- feat(types): declare existing properties of
import.meta.env
by @chenjiahan in #4871 - feat: integrate Rspack lazy compilation middleware by @chenjiahan in #4881
- feat(plugin): add "addContextDependency" and "addMissingDependency" to api.transform by @SoonIter in #4892
- feat(cors): update CORS defaults to allow loopback addresses by @chenjiahan in #4897
- feat(deps): update Rspack to v1.3.0 by @chenjiahan in #4906
Bug Fixes 🐞
- fix(cache):
buildCache.cacheDirectory
config not work by @Shucei in #4790 - fix: should merge copy config correctly when copy config type is different by @9aoy in #4793
- fix: update null checks to improve type safety by @chenjiahan in #4802
- fix(overlay): avoid multiple error overlay instances by @chenjiahan in #4803
- fix: MaxListenersExceeded warning after restarting server by @chenjiahan in #4826
- fix: handle errors in transform loader with try-catch block by @chenjiahan in #4837
- fix: allow to disable CSS minification if CSS is inlined by @chenjiahan in #4853
- fix(plugin-stylus):
define
option type by @chenjiahan in #4861 - fix(types): missing
server.cors
object type by @chenjiahan in #4877 - fix(server)!: should respect the value of the
server.cors
option by @chenjiahan in #4876 - fix(server): allow
server.headers
to overrideserver.cors
by @chenjiahan in #4898
Document 📖
- docs: update examples for server close method by @chenjiahan in #4788
- docs: add
loadEnv
option increateRsbuild
method by @chenjiahan in #4800 - docs: apply new theme colors to the documentation site by @chenjiahan in #4801
- docs:
getPlugins
can acceptenvironment
option by @chenjiahan in #4804 - docs: improve inline static assets by @chenjiahan in #4808
- docs: update ecosystem diagrams by @chenjiahan in #4811
- docs: add information on obtaining additional templates by @chenjiahan in #4813
- docs: update release dates for blogs by @chenjiahan in #4815
- docs: update SRI to match the latest implementation by @chenjiahan in #4819
- docs: update features list by @chenjiahan in #4823
- docs: add MultiCompiler references by @chenjiahan in #4836
- docs: add section on importing raw CSS files by @chenjiahan in #4842
- docs: update Rspress and fix Overview link style by @chenjiahan in #4847
- docs: fix typo in English HMR guide by @Chevindu in #4850
- docs:
pluginReact
is also needed when usingpluginSvgr
by @9aoy in #4857 - docs: add inline query parameter to CSS guide by @chenjiahan in #4865
- docs: import static assets as string by @chenjiahan in #4872
- docs: polish credits in README files by @chenjiahan in #4875
- docs: enhance CORS configuration examples by @chenjiahan in #4880
- docs: update lazy compilation configuration by @chenjiahan in #4882
- docs: clarify CORS security recommendations by @chenjiahan in #4894
- docs: correct
server.headers
type by @chenjiahan in #4895 - docs: clarify env files merge behavior by @chenjiahan in #4902
Other Changes
- test(e2e): add cases for
buildCache.cacheDirectory
by @chenjiahan in #4791 - chore(deps): update dependency nx to ^20.6.0 by @renovate in #4797
- test(e2e): replace fs.rmSync with async remove from fs-extra by @chenjiahan in #4805
- chore(deps): update all patch dependencies by @renovate in #4806
- chore(deps): update actions/setup-node action to v4.3.0 by @renovate in #4809
- chore(deps): update Rspress to 2.0.0-alpha.3 by @chenjiahan in #4814
- test: add case for SRI with async chunks by @chenjiahan in #4818
- release: 1.3.0-beta.0 by @chenjiahan in #4820
- chore(deps): update sass to ^1.86.0 by @renovate in #4821
- chore(deps): update dependency react-router-dom to ^7.4.0 by @renovate in #4825
- chore(deps): update all patch dependencies by @renovate in #4824
- refactor: move file watching and restart logic to separate module by @chenjiahan in #4828
- chore: remove prepare module to simplify CLI initialization code by @chenjiahan in #4830
- chore(deps): update dependency simple-git-hooks to ^2.12.1 by @renovate in #4839
- release: 1.3.0-beta.1 by @chenjiahan in #4848
- chore(deps): update dependency svelte to ^5.25.3 by @renovate in #4852
- chore(deps): update all patch dependencies by @renovate in #4851
- chore: replace merge with rspack-chain methods by @chenjiahan in #4854
- test(e2e): split CSS cases into separate folders by @chenjiahan in #4855
- chore(deps): update dependency @babel/preset-typescript to ^7.27.0 by @renovate in #4863
- chore(deps): update module federation to v0.11.2 by @renovate in #4810
- chore(webpack): improve logging condition for warning level by @Simon-He95 in #4864
- release: 1.3.0-beta.2 by @chenjiahan in #4867
- refactor(types): streamline query params and improve JSDoc by @chenjiahan in #4870
- refactor(server): refactor compilation middleware by @chenjiahan in #4878
- release: 1.3.0-beta.3 by @chenjiahan in #4884
- test(e2e): ensure proper async handling by @chenjiahan in #4883
- docs: fix broken TanStack Router link by @chenjiahan in #4887
- test(e2e): add more case for lazy compilation by @chenjiahan in #4888
- chore(workflow): should not run eco-ci when only doc changed by @9aoy in #4890
- chore(workflow): fix paths-filter job in eco-ci by @9aoy in #4891
- chore(workflow): extract changes check as a single job by @9aoy in #4893
- Revert "chore(workflow): extract changes check as a single job (#4893)" by @chenjiahan in #4896
- chore(deps): update dependency @types/semver to ^7.7.0 by @renovate in #4900
- chore(deps): update dependency @rslib/core to v0.6.0 by @renovate in #4899
- chore(deps): update pnpm to v10.7.0 by @renovate in #4901
- build: remove CJS export annotation by @fi3ework in #4903
- release: 1.3.0 by @chenjiahan in #4907
New Contributors
- @Shucei made their first contribution in #4790
- @Chevindu made their first contribution in #4850
- @Simon-He95 made their first contribution in #4864
Full Changelog: v1.2.19...v1.3.0