v3.12.0
- feat(app-tools): simplify the default HTML meta tags to UTF-8 charset and
width=device-width, initial-scale=1viewport. Remove the default zoom restrictions,shrink-to-fit,viewport-fit,x-ua-compatible,renderer,layoutmode,imagemode,wap-font-scale, andformat-detectionsettings. Existing applications using these defaults will receive the new tags after upgrading and rebuilding. Configurehtml.metaexplicitly if the application needs any of the removed settings, such asviewport-fit=coverfor edge-to-edge layouts orformat-detection: telephone=noto disable phone number detection. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9170 - feat: support a build-time
ssgParamsexport alongside a conventional page's data loader to generate static paths from route parameters. Combine generated paths with explicit SSG route lists, giving explicit options precedence for duplicate URLs. Global SSG settings apply to every entry unless an entry map is provided. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9167 - feat(server-core): set
Cache-Controlfor static files served by the production server. Build assets with a content hash getpublic, max-age=31536000, immutable, other static files getno-cache. Static files also get anETagcomputed from their content and answerIf-None-Matchwith304. Configure or disable it withserver.staticCacheControl. by @ramazansancar in https://github.com/web-infra-dev/modern.js/pull/9100
- fix: upgrade
@modern-js/polyfill-libto removedifffrom its production dependencies. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9184 - fix(app-tools): treat a build command followed only by
--helpor-h(for examplemodern build --helpormodern dev -h) as printing help, so it no longer empties the output directory or regeneratesnode_modules/.modern-js. The plugin lifecycle order is unchanged. by @byte-lyh in https://github.com/web-infra-dev/modern.js/pull/9180 - fix(app-tools, utils): centralize CLI plugin loading in
compatibleRequire. Fall back to ESM imports only whenrequirereports an incompatible ESM module, including modules with top-level await. Preserve other loading errors without retrying, avoiding misleading Windows URL scheme errors, and report the actual ESM execution error if the fallback fails. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9168 - fix: normalize Windows paths in generated route component imports, including custom entry directories and paths containing non-ASCII characters. by @GiveMe-A-Name in https://github.com/web-infra-dev/modern.js/pull/9198
- Use an explicit callable signature for the isFunction type guard when enabling TypeScript project discovery in the repository linter. by @GiveMe-A-Name in https://github.com/web-infra-dev/modern.js/pull/9178
- Remove an obsolete ambient type reference to the unavailable module-tools package. by @GiveMe-A-Name in https://github.com/web-infra-dev/modern.js/pull/9179
- feat(app-tools):将默认 HTML meta 标签精简为 UTF-8 字符编码和
width=device-width, initial-scale=1视口配置。移除默认缩放限制、shrink-to-fit、viewport-fit、x-ua-compatible、renderer、layoutmode、imagemode、wap-font-scale和format-detection设置。使用默认配置的已有应用在升级并重新构建后也会采用这些新值。如需保留已移除的设置,请通过html.meta显式配置,例如使用viewport-fit=cover保持页面铺满屏幕,或使用format-detection: telephone=no关闭电话号码自动识别。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9170 - feat: 支持在约定式路由的数据加载文件中导出构建期
ssgParams,由路由参数生成静态路径。合并生成路径与显式 SSG 路径列表,重复 URL 使用显式配置。未提供入口映射时,全局 SSG 配置适用于所有入口。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9167 - feat(server-core):生产服务器为静态文件设置
Cache-Control。文件名包含内容哈希的构建产物使用public, max-age=31536000, immutable,其他静态文件使用no-cache。静态文件还会带上根据内容计算的ETag,并对If-None-Match返回304。可以通过server.staticCacheControl修改或关闭。 由 @ramazansancar 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9100
- fix: 升级
@modern-js/polyfill-lib,移除其生产依赖中的diff。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9184 - fix(app-tools):构建类命令后面只跟
--help或-h时(例如modern build --help、modern dev -h)视为打印帮助,不再清空产物目录,也不再重新生成node_modules/.modern-js。插件生命周期顺序不变。 由 @byte-lyh 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9180 - fix(app-tools, utils):统一使用
compatibleRequire加载 CLI 插件,仅在require无法加载 ESM 模块时回退到 ESM 导入,支持包含顶层 await 的模块。其他加载错误直接抛出,避免被 Windows URL 协议错误覆盖。ESM 回退执行失败时,报告实际的 ESM 执行错误。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9168 - fix: 修复生成的路由组件 import 未转换 Windows 路径的问题,支持自定义入口目录及包含非 ASCII 字符的路径。 由 @GiveMe-A-Name 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9198
v3.11.3
- fix(app-tools): use a regular expression for watch ignores so node_modules and .git are ignored while generated files remain watched. by @stormslowly in https://github.com/web-infra-dev/modern.js/pull/9136
- fix(plugin-i18n): bundle the runtime's react-i18next import eagerly so it no longer adds an async chunk request before the first render. by @keepview in https://github.com/web-infra-dev/modern.js/pull/9155
- fix(plugin-i18n): register react-i18next once per i18n instance so server requests no longer grow its plugin list. by @keepview in https://github.com/web-infra-dev/modern.js/pull/9138
- fix(app-tools): keep watching a custom output.tempDir inside node_modules and keep the watch ignore in array form so Module Federation does not replace it. by @keepview in https://github.com/web-infra-dev/modern.js/pull/9137
- Upgrade @rsbuild/core to 2.3.2, which includes Rspack 2.3.2. by @stormslowly in https://github.com/web-infra-dev/modern.js/pull/9160
- Upgrade @rsbuild/core from v2.3.1 to v2.3.2. See v2.3.2 for details.
- fix(app-tools):将文件监听的忽略规则改为正则表达式,正确忽略 node_modules 和 .git,同时保留对生成文件的监听。 由 @stormslowly 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9136
- fix(plugin-i18n): 运行时对 react-i18next 的动态引入改为打进当前 chunk,首屏渲染前不再多请求一个异步 chunk。 由 @keepview 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9155
- fix(plugin-i18n): 每个 i18n 实例只注册一次 react-i18next,避免服务端每个请求都让插件列表变长。 由 @keepview 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9138
- fix(app-tools): 自定义的 output.tempDir 在 node_modules 下时也保持监听,监听忽略规则保持数组形式,避免被 Module Federation 插件替换。 由 @keepview 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9137
- 将 @rsbuild/core 升级至 2.3.2,其中包含 Rspack 2.3.2。 由 @stormslowly 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9160
- 升级 @rsbuild/core 从 v2.3.1 到 v2.3.2,查看 v2.3.2 了解详情。
v3.11.1
- feat(runtime): add
router.useTransitionsto control whether router state updates useReact.startTransitionby @keepview in https://github.com/web-infra-dev/modern.js/pull/9121
- fix(bff-core): type
Data,Query,Params,HeadersandUploadagainst Standard Schema instead of thezodpackage, so Zod 3 and Zod 4 schemas both type-check no matter whichzodcopy bff-core resolves. by @keepview in https://github.com/web-infra-dev/modern.js/pull/9089 - fix(server): use the named minimatch export in the development watcher so native ESM imports work with minimatch 11. by @SoonIter in https://github.com/web-infra-dev/modern.js/pull/9114
- fix: match prerendered SSG pages exactly and use available entry SSR or CSR fallbacks for other paths. Redirect trailing-slash SSG URLs to their canonical paths while preserving query strings. Skip non-2xx prerender responses with a warning instead of publishing error pages as successful HTML. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9084
- fix(mcp-apps): align the server-runtime peer dependency with the current workspace version. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9086
- fix(data-loader): handle redirects returned or thrown by server actions during client submissions. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9086
- fix(prod-server): default production server logging to info and document MODERN_SERVER_LOG_LEVEL. Set MODERN_SERVER_LOG_LEVEL=verbose to restore per-request logs. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9083
- fix(mcp-apps): remove the default loading placeholder in createMcpView by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9082
- fix(mcp-apps): synchronize the server-runtime peer dependency with the workspace version after the 3.10.4 release. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9083
- fix(runtime): keep chunk IDs that would lose information when converted to numbers in
loadable-stats.json, socompact-hashedIDs with leading zeros still match the ones registered by the runtime and string SSR hydration can finish. by @Hstealth in https://github.com/web-infra-dev/modern.js/pull/9097
- Upgrade @rsbuild/core to 2.3.1. by @stormslowly in https://github.com/web-infra-dev/modern.js/pull/9118
- Build render with Rslib while preserving public entry points and application RSC manifest references. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9085
- Upgrade @rsbuild/core from v2.2.13 to v2.3.1. See v2.3.1 for details.
- feat(runtime): 新增
router.useTransitions配置,控制路由状态更新是否使用React.startTransition由 @keepview 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9121
- fix(bff-core):
Data、Query、Params、Headers、Upload的参数类型改为基于 Standard Schema,不再依赖zod包本身。无论 bff-core 解析到哪个版本的zod,Zod 3 和 Zod 4 的 schema 都能通过类型检查。 由 @keepview 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9089 - fix(server):开发服务器 watcher 改用 minimatch 的具名导出,修复升级 minimatch 11 后原生 ESM 加载失败的问题。 由 @SoonIter 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9114
- fix: 精确匹配 SSG 预渲染页面,其他路径使用可用的入口 SSR 或 CSR 回退。将带尾部斜杠的 SSG URL 重定向到对应路径,并保留查询参数。跳过非 2xx 预渲染响应并输出警告,避免将错误页面作为成功的静态 HTML 发布。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9084
- fix(mcp-apps): 将 server-runtime peer 依赖对齐到当前工作区版本。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9086
- fix(data-loader): 修复客户端提交时服务端 action 返回或抛出的重定向无法触发页面跳转的问题。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9086
- fix(prod-server):生产服务器默认使用 info 日志级别,并补充 MODERN_SERVER_LOG_LEVEL 文档。设置 MODERN_SERVER_LOG_LEVEL=verbose 可恢复逐请求日志。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9083
- fix(mcp-apps):将 server-runtime 的 peer 依赖同步到 3.10.4 发布后的工作区版本。 由 @zllkjc 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9083
- fix(runtime): 修复
loadable-stats.json将compact-hashed产生的前导零 chunk ID 转为数字,导致与实际注册的 ID 不匹配、string SSR 水合无法完成的问题。 由 @Hstealth 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9097
- 将 @rsbuild/core 升级至 2.3.1。 由 @stormslowly 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9118
- 升级 @rsbuild/core 从 v2.2.13 到 v2.3.1,查看 v2.3.1 了解详情。
v3.11.0
- fix: keep "=" characters inside cookie values when parsing the SSR request cookie header by @kwy404 in https://github.com/web-infra-dev/modern.js/pull/8936
- Add MCP Apps support in a single
@modern-js/mcp-appspackage with build plugin, server plugin, BFF and Fetch adapters, React and Module Federation views, manifest-based UI resource registration, and anmcp-appsproject template. by @danpeen in https://github.com/web-infra-dev/modern.js/pull/9062
- fix: 解析 SSR 请求的 Cookie 请求头时保留 Cookie 值中的 "=" 字符 由 @kwy404 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8936
- 新增 MCP Apps 支持,由单一的
@modern-js/mcp-apps包提供构建插件、服务端插件、BFF 和 Fetch 适配器、React 和 Module Federation 视图、基于清单的 UI 资源注册,以及mcp-apps项目模板。 由 @danpeen 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9062
v3.10.4
- fix(app-tools): recognize
-eas an alias of--entrywhen selecting dev entries by @tmkx in https://github.com/web-infra-dev/modern.js/pull/9038 - fix(bff-core): accept unknown input during schema validation to support Zod 4 declaration generation. by @renovate[bot] in https://github.com/web-infra-dev/modern.js/pull/9059
- fix: compile server TypeScript files to CommonJS with swc when ts-node is not installed, so the dev server can reload them and syntax like enum and decorators works on every Node.js version by @keepview in https://github.com/web-infra-dev/modern.js/pull/9066
- fix(app-tools): 选择开发入口时,将
-e识别为--entry的别名 由 @tmkx 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9038 - fix(bff-core):校验时接收未知输入,修复升级 Zod 4 后的类型声明构建失败。 由 @renovate[bot] 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9059
- fix: 未安装 ts-node 时用 swc 把服务端 TypeScript 文件编译为 CommonJS,使 dev server 能热更新这些文件,并在所有 Node.js 版本下支持 enum、装饰器等语法 由 @keepview 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9066
v3.10.3
- fix: use Hono's pathname normalization when matching render routes to handle encoded characters consistently by @SoonIter in https://github.com/web-infra-dev/modern.js/pull/9036
- fix: 渲染路由匹配复用 Hono 的路径归一化,修复编码字符路径返回 404 的问题 由 @SoonIter 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9036
v3.10.2
- perf: skip body parsing for GET and HEAD BFF requests and reuse per-route param names by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9004
- perf: skip importing
html-minifier-terserwhen HTML minification is disabled, such as in development by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9005 - perf: reuse the static handler of data loader requests and match the entry without sorting the server routes on every request by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9011
- perf: load
ndepelazily in deploy presets so CLI startup no longer pays for it on every command by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9003 - perf: calculate the size of Buffer and string values in the memory cache without
JSON.stringify, binary files are now counted by their real size, so the default 256 MB cache can hold up to 256 MB of them instead of about 71 MB by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9013 - perf: skip parsing nested route data files that cannot export
actionwhen generating routes by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9008 - perf: collect public folder routes in linear time without a stat call per file by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9007
- perf: write Node.js response bodies with a stream reader loop instead of
pipeTo(Writable.toWeb(res)),sendResponsenow resolves onceres.end()is called by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9014 - perf: trim per-request work in the render path and set Server-Timing with a single header update by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9015
- perf: cache the inlined css and js assets read during SSR instead of reading them on every request by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9010
- perf: create the public middleware once without sorting the shared routes on every request, and stat static files only once per request by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9006
- perf: search only newly streamed text for the shell end marker in streaming SSR instead of re-decoding and re-scanning the whole buffered shell for every chunk by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9012
- perf: skip HTML tokenizing of streaming SSR output when no deferred resolver script can be inserted, and skip the end tag search inside inline script and style text until a
<shows up by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9016 - perf: apply the template replacements before inserting the app html in string SSR by @deepcoldy in https://github.com/web-infra-dev/modern.js/pull/9009
- fix: preserve literal characters when registering page render routes with Hono by @GiveMe-A-Name in https://github.com/web-infra-dev/modern.js/pull/8998
- fix(app-tools): scope streaming HTML script rewriting to each entry so CSR and string SSR pages retain their script order and injection settings in mixed applications. by @byte-lyh in https://github.com/web-infra-dev/modern.js/pull/9033
- perf: BFF 的 GET 和 HEAD 请求跳过请求体解析,并复用每个路由的参数名 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9004
- perf: 在 HTML 压缩未启用时(例如开发模式)跳过加载
html-minifier-terser由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9005 - perf: 数据加载请求复用 static handler,并且匹配入口时不再在每次请求时排序服务端路由 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9011
- perf: 部署预设中按需加载
ndepe,避免每个 CLI 命令启动时都加载它 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9003 - perf: 内存缓存计算 Buffer 和字符串大小时不再使用
JSON.stringify序列化,二进制文件按真实大小计算,默认 256 MB 缓存可以存放约 256 MB 的文件,而不是原来的约 71 MB 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9013 - perf: 生成路由时跳过不可能导出
action的 data 文件的解析 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9008 - perf: 以线性时间收集 public 目录路由,不再对每个文件调用 stat 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9007
- perf: 使用流读取循环代替
pipeTo(Writable.toWeb(res))写入 Node.js 响应体,sendResponse在调用res.end()后即完成 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9014 - perf: 减少渲染链路中每个请求的额外开销,并一次性写入 Server-Timing 响应头 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9015
- perf: SSR 内联 CSS 和 JS 资源时缓存文件内容,不再在每次请求时读取文件 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9010
- perf: public 中间件只创建一次,不再在每次请求时排序共享的路由数组,静态文件每次请求只调用一次 stat 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9006
- perf: 流式 SSR 查找 shell 结束标记时只搜索新到达的内容,不再为每个 chunk 重新解码并扫描整个已缓冲的 shell 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9012
- perf: 流式 SSR 在不会插入任何 deferred resolver 脚本时跳过对输出的 HTML 逐字符解析,并且在内联 script 和 style 文本中遇到
<之前不再进行结束标签匹配 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9016 - perf: 字符串 SSR 在插入应用 HTML 之前完成模板替换,避免反复扫描和复制完整文档 由 @deepcoldy 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9009
- fix: 向 Hono 注册页面渲染路由时保留路径中的字面字符,修复 HTML 路径及渲染中间件匹配失败 由 @GiveMe-A-Name 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8998
- fix(app-tools): 按入口处理流式 HTML 脚本改写,避免混用应用中的 CSR 和字符串 SSR 页面丢失脚本执行顺序或插入位置配置。 由 @byte-lyh 实现, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9033
v3.10.1
- Pass the server-core fileReader singleton from the runtime server into development helpers so HTML templates, static resources, compiler filesystem initialization and rebuild invalidation use the same reader even when the two packages resolve different runtime-utils copies. in https://github.com/web-infra-dev/modern.js/pull/9017
v3.10.0
- fix: keep loadable hydration aligned with
output.chunkLoadingGlobalcustomized by Rspack plugins in https://github.com/web-infra-dev/modern.js/pull/8839 - fix(i18n): use named router imports and return only the required react-i18next exports to allow unused dependency code to be tree-shaken. in https://github.com/web-infra-dev/modern.js/pull/8957
- fix(runtime): keep the original error when a route module fails to load in https://github.com/web-infra-dev/modern.js/pull/8996
- fix(server-core): discard the AsyncLocalStorage callback result when registering request middleware so an unfinished Hono Context cannot escape as the response. in https://github.com/web-infra-dev/modern.js/pull/9000
- chore: upgrade Rsbuild to v2.2.13 in https://github.com/web-infra-dev/modern.js/pull/8999
- Add Rstack CLI documentation guidance to AGENTS.md in new projects. in https://github.com/web-infra-dev/modern.js/pull/8993
- Add a pre-commit hook to new standalone projects using Rstack CLI to lint and format staged files. in https://github.com/web-infra-dev/modern.js/pull/8989
- Recommend the Rstack VS Code extension in new standalone projects. in https://github.com/web-infra-dev/modern.js/pull/8991
- Move the runtime script to the body before production inlining so streaming SSR hydration waits for initial router data. When runtime extraction is disabled, move the entry containing the runtime to the body and preload it from the head to preserve early downloading. in https://github.com/web-infra-dev/modern.js/pull/8956
- 修复共享 Rslib 配置中多个构建目标并发写入同一声明目录导致的类型文件损坏问题。 in https://github.com/web-infra-dev/modern.js/pull/8959
- Generate only AGENTS.md for AI coding guidance. Stop creating or updating CLAUDE.md in project templates and the --agents-md-only command. in https://github.com/web-infra-dev/modern.js/pull/8984
- chore: remove obsolete Jest test plugin hooks, configuration types, and the unused
testingandtools.jestconfiguration options. in https://github.com/web-infra-dev/modern.js/pull/8994 - Use Rstack CLI for linting and formatting in new projects. in https://github.com/web-infra-dev/modern.js/pull/8983
- Wait for existing Node production SSR bundle warmup before starting the server, and preserve required SSR entry loading errors instead of starting with missing render modules. Non-SSR/static routes are not treated as required SSR entries. Missing optional loader bundles and manifests remain supported; CSR-only, RSC and development startup behavior is unchanged. Lazy route modules are not eagerly loaded. in https://github.com/web-infra-dev/modern.js/pull/8996
- chore(deps): upgrade Rsbuild to v2.2.12. in https://github.com/web-infra-dev/modern.js/pull/8952
- Upgrade @rsbuild/core from v2.2.9 to v2.2.13. See v2.2.10, v2.2.11, v2.2.12, and v2.2.13 for details.
- fix: 确保 loadable 水合使用 Rspack 插件自定义的
output.chunkLoadingGlobal, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8839 - fix(i18n): 使用 Router 命名导入,并仅返回所需的 react-i18next 导出,便于构建器裁剪未使用的依赖代码。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8957
- fix(runtime): 路由模块加载失败时保留原始错误 Preserve module initialization errors across preloads and repeated imports in SSR server bundles, without changing browser bundle error handling. SSR server bundle 在 preload 和重复 import 后仍保留模块初始化的原始 error,不改变 browser bundle 的错误处理。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8996
- fix(server-core): 注册请求上下文中间件时,不再返回 AsyncLocalStorage 回调的结果,避免未完成的 Hono Context 被当作响应返回。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/9000
- chore: 升级 Rsbuild 至 v2.2.13, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8999
- chore: 移除已废弃的 Jest 测试插件钩子、配置类型以及无用的
testing和tools.jest配置项。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8994 - chore(deps): 升级 Rsbuild 到 v2.2.12。, 详情可查看 https://github.com/web-infra-dev/modern.js/pull/8952
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