v3.9.3
- feat(builder):
tools.less/tools.sassaccept the full Rsbuild plugin options and addtools.svgr, so plugin-level options such asparallelcan be configured; the legacy forms keep working and are marked deprecated. in https://github.com/web-infra-dev/modern.js/pull/8881
- fix: fall back to supported base languages when detecting SSR query and cookie languages for custom i18n wrappers, while preserving exact language tag matches. in https://github.com/web-infra-dev/modern.js/pull/8922
- fix: correct the "Middlware" typo in BFF middleware identifiers — the exported
PublicMiddlwareOptionstype from@modern-js/server-coreis renamed toPublicMiddlewareOptions, and the internalrouteMiddlwaresvariable in@modern-js/plugin-bffis renamed torouteMiddlewaresin https://github.com/web-infra-dev/modern.js/pull/8791 - fix: emit streaming SSR deferred resolver scripts only at safe HTML boundaries in https://github.com/web-infra-dev/modern.js/pull/8838
- fix: emit completion scripts for deferred fields serialized as pending during streaming SSR in https://github.com/web-infra-dev/modern.js/pull/8838
- chore: upgrade Rsbuild to v2.2.9 in https://github.com/web-infra-dev/modern.js/pull/8924
- Remove the programmatic
buildanddeployexports and restore CLI-owned in https://github.com/web-infra-dev/modern.js/pull/8885 - Keep SSR cache revalidation running after a completed HTTP response while preserving cancellation for disconnected clients. Handle background render and stream failures without unhandled rejections or caching incomplete HTML. in https://github.com/web-infra-dev/modern.js/pull/8889
- feat(builder):
tools.less/tools.sass支持传入 Rsbuild 插件完整选项并新增tools.svgr,可配置parallel等插件级选项;旧写法继续生效并标记废弃。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8881
- fix: 修复自定义 i18n wrapper 在 SSR 中通过 URL 参数和 cookie 检测语言时缺少基础语言回退的问题,同时保留完整语言标签的优先匹配。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8922
- fix: 修正 BFF 中间件标识符里的 "Middlware" 拼写错误——
@modern-js/server-core导出的PublicMiddlwareOptions类型更名为PublicMiddlewareOptions,@modern-js/plugin-bff内部变量routeMiddlwares更名为routeMiddlewares, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8791 - fix: Streaming SSR 的 deferred resolver script 仅在安全的 HTML 边界输出, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8838
- fix: 流式 SSR 中,初始序列化为等待状态的 deferred 字段完成后发送通知, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8838
- chore: 升级 Rsbuild 至 v2.2.9, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8924
- build and deploy lifecycles. Programmatic dev and start calls no longer change CLI-only initialization behavior, and completed non-watch builds are no longer closed automatically. Keep the public
closeServerAPI andDeployOptionstype., 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8885
v3.9.2
- fix(app-tools): remove
@modern-js/server-runtimefrom the SSR bundle externals in https://github.com/web-infra-dev/modern.js/pull/8875
- chore: upgrade Rsbuild to v2.2.6 in https://github.com/web-infra-dev/modern.js/pull/8871
- chore: upgrade Rsbuild to v2.2.7 in https://github.com/web-infra-dev/modern.js/pull/8876
- chore: 升级 Rsbuild 至 v2.2.6, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8871
- chore: 升级 Rsbuild 至 v2.2.7, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8876
v3.9.1
- fix: preserve the SSR request abort signal when creating the router loader request in https://github.com/web-infra-dev/modern.js/pull/8858
- fix: respect the TypeScript compiler configured by ts-node in https://github.com/web-infra-dev/modern.js/pull/8844
- fix: use conventional route loading components as hydration fallbacks while initial route data is loading in https://github.com/web-infra-dev/modern.js/pull/8859
- Upgrade Rsbuild to 2.2.4 and support its stricter bundler chain types, preserving service worker library options and handling non-string public paths in asset prefix templates. in https://github.com/web-infra-dev/modern.js/pull/8860
- Upgrade @rsbuild/core from v2.2.0-rc.0 to v2.2.4. See v2.2.0, v2.2.1, v2.2.2, v2.2.3, and v2.2.4 for details.
- fix: 构造路由 loader 请求时保留 SSR 请求的取消信号, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8858
- fix: 使用 ts-node 配置中指定的 TypeScript 编译器, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8844
- fix: 初始路由数据加载期间使用约定式路由的 loading 组件作为 hydration fallback, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8859
- 升级 Rsbuild 至 2.2.4,兼容更严格的 bundler chain 类型,保留 service worker 的 library 配置,并在 assetPrefix 模板中处理非字符串 publicPath。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8860
v3.9.0
- fix(app-tools): fix BFF ts-node-loader compatibility with ESM in https://github.com/web-infra-dev/modern.js/pull/8692
- chore: prepare the 3.9.0 minor release. in https://github.com/web-infra-dev/modern.js/pull/8840
- Remove the server plugin
fallbackhook. SSR-to-CSR fallback events are now reported directly through request monitors as a warning and anssr-fallbackcounter. in https://github.com/web-infra-dev/modern.js/pull/8836
- fix(plugin-runtime): fix document CLI compatibility with ESM lib format fix(app-tools): 修复 BFF ts-node-loader 在 ESM 构建格式下的兼容性问题 fix(plugin-runtime): 修复 document CLI 在 ESM 构建格式下的兼容性问题, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8692
v3.8.3
- fix: stop writing the ESM loader files twice in https://github.com/web-infra-dev/modern.js/pull/8819
- fix: upgrade @rsbuild/plugin-styled-components to v1.7.0 for Rsbuild 2.2 compatibility in https://github.com/web-infra-dev/modern.js/pull/8821
- chore: upgrade Rsbuild to v2.2.0-rc.0 and the SWC plugin to the latest version in https://github.com/web-infra-dev/modern.js/pull/8818
- chore: upgrade Rsbuild dependencies to the latest versions in https://github.com/web-infra-dev/modern.js/pull/8814
- Upgrade @rsbuild/core from v2.1.0 to v2.2.0-rc.0. See v2.2.0-rc.0 for details.
- fix: 修复 ESM loader 文件被重复写入的问题, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8819
- fix: 将 @rsbuild/plugin-styled-components 升级至 v1.7.0,以兼容 Rsbuild 2.2, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8821
- chore: 升级 Rsbuild 至 v2.2.0-rc.0,并将 SWC 插件升级至最新版本, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8818
- chore: 升级 Rsbuild 相关依赖至最新版本, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8814
- 升级 @rsbuild/core 从 v2.1.0 到 v2.2.0-rc.0,查看 v2.2.0-rc.0 了解详情。
v3.8.2
- fix: make published crossProject BFF client declarations resolvable in consumers in https://github.com/web-infra-dev/modern.js/pull/8797
- fix: 修复发布后的 crossProject BFF 客户端声明在消费方项目中无法解析类型的问题, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8797
v3.8.1
- chore(app-tools): bump the package version for release in https://github.com/web-infra-dev/modern.js/pull/8798
- chore(app-tools): 更新包版本以发布新版本, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8798
v3.8.0
- feat: bundle version-matched docs into
@modern-js/app-toolsand generateAGENTS.md/CLAUDE.mdpointing at them, so AI coding agents read docs matching the installed version in https://github.com/web-infra-dev/modern.js/pull/8781 - feat: agent knowledge supply — bundle version-matched English docs into the app-tools tarball (
docs/) on publish, and generateAGENTS.md/CLAUDE.mdin new projects created by@modern-js/create(skip with--no-agents-md). Existing projects can runnpx @modern-js/create --agents-md-onlyto add or idempotently refresh these files after an upgrade (managed marker block is updated in place, user content is preserved). Also fixes boolean flags swallowing the following positional argument (e.g.create --sub my-app). in https://github.com/web-infra-dev/modern.js/pull/8781 - feat: support configuring the Mock directory through
dev.mockDirin https://github.com/web-infra-dev/modern.js/pull/8780
- fix: guard language detector process access for edge runtimes in https://github.com/web-infra-dev/modern.js/pull/8751
- fix: type render route misses explicitly in https://github.com/web-infra-dev/modern.js/pull/8754
- fix(server-core): share the hono request context storage across duplicated module copies via a process-global AsyncLocalStorage, so BFF handlers no longer fail with "Can't call useContext out of server scope" when the host and plugin resolve different server-core instances in https://github.com/web-infra-dev/modern.js/pull/8776
- fix: make custom server output runnable under native ESM (pass
moduleType, resolve.tsx/.jsxentries, transform JSX) in https://github.com/web-infra-dev/modern.js/pull/8784 - fix: respect output.module for service-worker environment output in https://github.com/web-infra-dev/modern.js/pull/8752
- Export the programmatic
deployAPI and make it own the build, server plugin in https://github.com/web-infra-dev/modern.js/pull/8783 - Export
closeServerfrom the package root. Programmaticdevandstartin https://github.com/web-infra-dev/modern.js/pull/8783 - Export the programmatic
buildAPI and its options from the package root, initialize the builder whenbuildis supplied through the app-context command, and close completed non-watch builds before returning. TheonPreparedist cleanup now also recognizes the programmaticappContext.command, so programmaticdev/buildclean stale output the same way the CLI does (still honoringoutput.cleanDistPathand running beforenestedRoutes.jsonis generated). in https://github.com/web-infra-dev/modern.js/pull/8783
- feat: 随包分发与安装版本一致的文档,并生成指向它的
AGENTS.md/CLAUDE.md,让 AI 编码助手读到与所装版本匹配的文档, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8781 - feat: Agent 知识供给 —— 发布时将版本匹配的英文文档打进 app-tools tarball(
docs/),并在@modern-js/create新建项目时默认生成AGENTS.md/CLAUDE.md(--no-agents-md可跳过)。已有项目可运行npx @modern-js/create --agents-md-only在升级后补齐或幂等更新这两个文件(就地更新托管标记块,保留用户自定义内容)。同时修复布尔参数吞掉后续位置参数的问题(如create --sub my-app)。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8781 - feat: 支持通过
dev.mockDir配置 Mock 目录, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8780
- fix: 修复语言检测器在 Edge 运行时访问 process 的问题, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8751
- fix: 明确渲染路由未命中的类型, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8754
- fix(server-core): 通过进程级 AsyncLocalStorage 让 hono 请求上下文在重复加载的模块副本间共享,宿主与插件解析到不同 server-core 实例时 BFF 不再报 "Can't call useContext out of server scope", 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8776
- fix: 修复自定义 Server 在原生 ESM 下的产物不可运行问题(透传
moduleType、支持.tsx/.jsx入口解析、编译 JSX), 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8784 - fix: 在 service-worker 环境中遵循 output.module 输出配置, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8752
- loading, and deploy hook lifecycle., 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8783
- initialization now uses the app-context command when no CLI build command is present, including occupied port selection., 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8783
- 从包根导出程序化
buildAPI 及其选项,在通过 app-context command 传入build时初始化 builder,并在返回前关闭已完成的非 watch 构建。onPrepare的 dist 清理现在也识别程序化的appContext.command,使程序化dev/build与 CLI 一样清理陈旧产物(仍遵循output.cleanDistPath,并在生成nestedRoutes.json之前执行)。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8783
v3.7.0
- feat(builder): add
source.reactCompilerto enable React Compiler via Rspack's built-in SWC implementation in https://github.com/web-infra-dev/modern.js/pull/8763
- fix(runtime): exclude the SSR hydration runtime from CSR bundles in https://github.com/web-infra-dev/modern.js/pull/8762
- fix(runtime): exclude the RSC client runtime from web bundles when
server.rscis disabled in https://github.com/web-infra-dev/modern.js/pull/8762
- feat(builder): 新增
source.reactCompiler配置,基于 Rspack 内置 SWC 的 Rust 版 React Compiler 提供一键开启能力, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8763
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