v3.6.0
- feat(server): unified dev-server runtime hot reload, replacing the BFF-local hot update in https://github.com/web-infra-dev/modern.js/pull/8720
- fix: prevent path traversal in static asset middleware in https://github.com/web-infra-dev/modern.js/pull/8749
- refactor: drop React 17 support and import react-dom/client statically in the browser runtime in https://github.com/web-infra-dev/modern.js/pull/8750
- feat(server): 统一 dev-server 运行时热更新,替换 BFF 本地热更, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8720
- fix: 修复静态资源中间件的路径穿越问题, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8749
- refactor: 浏览器运行时移除 React 17 支持,并改为静态引入 react-dom/client, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8750
v2.71.1
- fix(runtime): string-mode SSR no longer drops a route's stylesheet when the same CSS is referenced by a non-stylesheet
<link>(e.g.<link rel="prefetch">) by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/8689 - fix(runtime): streaming SSR no longer skips route stylesheets when the same CSS URL already appears as a non-stylesheet
<link>such asrel="prefetch"by @yimingjfe in https://github.com/web-infra-dev/modern.js/pull/8695
LoadableCollector.emitStyleAssets(string SSR) deduped injected route stylesheets against every<link href>in the template, so a<link rel="prefetch">for the same css URL (e.g. fromperformance.prefetch) made the real<link rel="stylesheet">be skipped and the route rendered unstyled. It now reuses the sharedhasStylesheetLinkhelper (also used by streaming SSR), which only matches existing<link rel="stylesheet">tags. 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8689- fix(runtime): 流式 SSR 不再因为同一 CSS URL 已作为
rel="prefetch"等非 stylesheet<link>出现在模板中而跳过路由样式注入 由 @yimingjfe 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8695
v3.5.0
- feat(app-tools): add
modifyBuilderEnvironmentshook to transform the builder environments map before the builder is created in https://github.com/web-infra-dev/modern.js/pull/8717 - feat(builder): upgrade rsbuild version to 2.1.0 in https://github.com/web-infra-dev/modern.js/pull/8721
- fix(runtime): use the final HTML template parameters when rendering custom Document in https://github.com/web-infra-dev/modern.js/pull/8715
- chore(ai-infra): repo-level AI coding agents infrastructure (AGENTS.md / CLAUDE.md, skills docs, AI Coding Agents guide). in https://github.com/web-infra-dev/modern.js/pull/8651
- chore(builder): upgrade @rsbuild/plugin-type-check to 1.5.0 in https://github.com/web-infra-dev/modern.js/pull/8725
- Upgrade @rsbuild/core from v2.0.10 to v2.1.0. See v2.1.0 for details.
- A new additive app-tools hook
modifyBuilderEnvironmentsruns ingenerateBuilderafter the framework's static environment merge and beforecreateBuilder. It mirrorsmodifyEntrypointsas a transform-object async hook: each tapped callback receives{ environments }and may return a replacement map that chains to the next callback; tapping nothing leaves the environments byte-identical, so the change is fully backward compatible. This lets frameworks programmatically add environments (e.g. a custom browser worker environment), set per-environmentoutput/distPath/ordering, or otherwise adjust the resolved environments map instead of being limited to a config-static merge. feat(app-tools): 新增modifyBuilderEnvironmentshook,可在创建 builder 前变换 builder 环境表 新增的 app-tools hookmodifyBuilderEnvironments在generateBuilder中、框架静态环境合并之后、createBuilder之前执行。它与modifyEntrypoints一致,是 transform-object 异步 hook:每个回调收到{ environments },可返回替换后的环境表并链式传给下一个回调;不挂载任何回调时环境表字节不变,完全向后兼容。框架可借此以编程方式新增环境(如自定义浏览器 worker 环境)、设置 per-environment 的output/distPath/顺序,或调整已解析的环境表,而不再局限于静态配置合并。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8717 - feat(builder): 更新 Rsbuild 版本到 2.1.0, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8721
- fix(runtime): 渲染自定义 Document 时使用最终的 HTML 模板参数, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8715
- No package release needed: this PR only adds repo-level files and docs content; it makes no change to any published package's runtime (
@modern-js/createhas zero net diff). Empty changeset added to satisfy the changeset bot without triggering a version bump., 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8651 - chore(builder): 升级 @rsbuild/plugin-type-check 到 1.5.0, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8725
- 升级 @rsbuild/core 从 v2.0.10 到 v2.1.0,查看 v2.1.0 了解详情。
v3.4.0
- feat(server-core): pass request and monitors context to server plugin fallback hooks in https://github.com/web-infra-dev/modern.js/pull/8678
- feat(builder): support customizing RSC server/client environment names via
server.rsc.environmentsin https://github.com/web-infra-dev/modern.js/pull/8691
- fix(plugin-i18n): keep browser backend locale paths independent from assetPrefix in https://github.com/web-infra-dev/modern.js/pull/8679
- fix(plugin-i18n): align SSR backend with detected public locales directory in https://github.com/web-infra-dev/modern.js/pull/8679
- fix(runtime): string-mode SSR no longer drops a route's stylesheet when the same CSS is referenced by a non-stylesheet
<link>(e.g.<link rel="prefetch">) in https://github.com/web-infra-dev/modern.js/pull/8699 - fix(runtime,app-tools): inject CSS of React.lazy descendants into streaming SSR shell to prevent FOUC; slim inline route manifest to only
chunkIdswhen RSC is disabled in https://github.com/web-infra-dev/modern.js/pull/8677 - fix(runtime): split streaming SSR chunk at SHELL_STREAM_END_MARK so suspense boundary content is not swallowed before shellAfter in https://github.com/web-infra-dev/modern.js/pull/8676
- feat(server-core): 为 server 插件 fallback hook 传递 request 和 monitors 上下文, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8678
server.rscnow accepts an object form{ environments?: { server?: string; client?: string } }in addition to a boolean. This forwards the existingenvironmentsoption ofrsbuild-plugin-rsc, letting frameworks that declare their own Rsbuild environments map RSC onto them instead of having the plugin create new emptyserver/clientenvironments (which otherwise fall back to the default./srcentry and fail to resolve in non-convention setups). Passingtrue/falsekeeps the previous default behavior, so the change is fully backward compatible. feat(builder): 支持通过server.rsc.environments自定义 RSC server/client 环境名server.rsc在原有 boolean 之外新增对象形式{ environments?: { server?: string; client?: string } },透传rsbuild-plugin-rsc已有的environments选项,使已声明自有 Rsbuild 环境的框架可将 RSC 映射到这些环境,而不必让插件新建空的server/client环境(否则会回落到默认入口./src而无法解析)。传true/false时行为不变,完全向后兼容。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8691
- fix(plugin-i18n): 浏览器端 backend 加载本地语言资源时不再拼接 assetPrefix, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8679
- fix(plugin-i18n): SSR backend 跟随检测到的 public locales 目录,避免与根 locales 目录读取不一致, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8679
LoadableCollector.emitStyleAssets(string SSR) deduped injected route stylesheets against every<link href>in the template, so a<link rel="prefetch">for the same css URL (e.g. fromperformance.prefetch) made the real<link rel="stylesheet">be skipped and the route rendered unstyled. It now reuses the sharedhasStylesheetLinkhelper (also used by streaming SSR), which only matches existing<link rel="stylesheet">tags., 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8699- fix(runtime,app-tools): 流式 SSR 注入 React.lazy 子 chunk 的 CSS 到首屏 shell, 避免懒加载组件出现样式闪烁; 非 RSC 场景下 inline 路由 manifest 仅保留
chunkIds, 减少 HTML 体积, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8677 - fix(runtime): 流式 SSR 在 SHELL_STREAM_END_MARK 位置切分 chunk,避免 suspense 兑现内容被夹在 shellAfter 之前, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8676
v3.3.0
- feat: enable Rspack lazy compilation by default in CSR and stream SSR dev (string SSR / RSC / SSG stay disabled) in https://github.com/web-infra-dev/modern.js/pull/8638
- feat(builder): support TypeScript Go checks through
tools.tsCheckerin https://github.com/web-infra-dev/modern.js/pull/8673
- feat: keep stream SSR first-screen assets correct under lazy compilation by forcing route components eager feat: CSR 与 stream SSR 开发环境下默认开启 Rspack 按需编译(string SSR / RSC / SSG 仍默认关闭) feat: 通过强制路由组件 eager 编译,保证 stream SSR 在按需编译下首屏资源仍正确, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8638
- feat(builder): 通过
tools.tsChecker支持 TypeScript Go 类型检查, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8673
v3.2.2
- fix(plugin-i18n): expose i18n fields on runtime context type in https://github.com/web-infra-dev/modern.js/pull/8642
- Upgrade @rsbuild/core from v2.0.0 to v2.0.10. See v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5, v2.0.6, v2.0.7, v2.0.8, v2.0.9, and v2.0.10 for details.
- fix(plugin-i18n): 将 i18n 字段暴露到运行时上下文类型上, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8642
v3.2.1
- feat: support tsconfig.server.json for server-side TypeScript in https://github.com/web-infra-dev/modern.js/pull/8596
- add @rsbuild/core/types reference to app-tools types in https://github.com/web-infra-dev/modern.js/pull/8544
- feat: 支持单独配置服务端 tsconfig 配置, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8596
v2.71.0
- feat: add
source.enableAsyncPreEntryfor async entry scenarios by @2heal1 in https://github.com/web-infra-dev/modern.js/pull/8547
v3.2.0
- feat: add
source.enableAsyncPreEntryfor async entry scenarios in https://github.com/web-infra-dev/modern.js/pull/8546
- chore: update dependencies in https://github.com/web-infra-dev/modern.js/pull/8592
- chore: 更新基础依赖, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8592
v3.1.5
- fix: 修复 Rspack 2.0 下的 chunk ID 问题, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8570
- chore: 升级 @rsbuild 相关依赖至 v2.0.0, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8565
- 升级 @rsbuild/core 从 v2.0.0-rc.0 到 v2.0.0,查看 v2.0.0 了解详情。