web-infra-dev/modern.js
 Watch   
 Star   
 Fork   
5 days ago
modern.js

v3.12.0

What's Changed

New Features 🎉

  • feat(app-tools): simplify the default HTML meta tags to UTF-8 charset and width=device-width, initial-scale=1 viewport. Remove the default zoom restrictions, shrink-to-fit, viewport-fit, x-ua-compatible, renderer, layoutmode, imagemode, wap-font-scale, and format-detection settings. Existing applications using these defaults will receive the new tags after upgrading and rebuilding. Configure html.meta explicitly if the application needs any of the removed settings, such as viewport-fit=cover for edge-to-edge layouts or format-detection: telephone=no to disable phone number detection. by @zllkjc in https://github.com/web-infra-dev/modern.js/pull/9170
  • feat: support a build-time ssgParams export 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-Control for static files served by the production server. Build assets with a content hash get public, max-age=31536000, immutable, other static files get no-cache. Static files also get an ETag computed from their content and answer If-None-Match with 304. Configure or disable it with server.staticCacheControl. by @ramazansancar in https://github.com/web-infra-dev/modern.js/pull/9100

Bug Fixes 🐞

  • fix: upgrade @modern-js/polyfill-lib to remove diff from 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 --help or -h (for example modern build --help or modern dev -h) as printing help, so it no longer empties the output directory or regenerates node_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 when require reports 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

Other Changes ✨

更新内容

新特性 🎉

  • 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

Bug 修复 🐞

  • 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
13 days ago
modern.js

v3.11.3

What's Changed

Bug Fixes 🐞

Other Changes ✨

Rsbuild Update 📦

  • Upgrade @rsbuild/core from v2.3.1 to v2.3.2. See v2.3.2 for details.

更新内容

Bug 修复 🐞

其他变更 ✨

Rsbuild 更新 📦

  • 升级 @rsbuild/core 从 v2.3.1 到 v2.3.2,查看 v2.3.2 了解详情。
19 days ago
modern.js

v3.11.1

What's Changed

New Features 🎉

Bug Fixes 🐞

Other Changes ✨

Rsbuild Update 📦

  • Upgrade @rsbuild/core from v2.2.13 to v2.3.1. See v2.3.1 for details.

更新内容

新特性 🎉

Bug 修复 🐞

其他变更 ✨

Rsbuild 更新 📦

  • 升级 @rsbuild/core 从 v2.2.13 到 v2.3.1,查看 v2.3.1 了解详情。
25 days ago
modern.js

v3.11.0

What's Changed

Bug Fixes 🐞

Other Changes ✨

  • Add MCP Apps support in a single @modern-js/mcp-apps package with build plugin, server plugin, BFF and Fetch adapters, React and Module Federation views, manifest-based UI resource registration, and an mcp-apps project template. by @danpeen in https://github.com/web-infra-dev/modern.js/pull/9062

更新内容

Bug 修复 🐞

其他变更 ✨

  • 新增 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
26 days ago
modern.js

v3.10.4

What's Changed

Bug Fixes 🐞

更新内容

Bug 修复 🐞

2026-10-22 17:48:55
modern.js

v3.10.3

What's Changed

Bug Fixes 🐞

更新内容

Bug 修复 🐞

2026-10-22 07:13:55
modern.js

v3.10.2

What's Changed

Performance Improvements ⚡

Bug Fixes 🐞

更新内容

性能优化 ⚡

Bug 修复 🐞

2026-10-19 12:54:27
modern.js

v3.10.1

What's Changed

Other Changes ✨

  • 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
2026-10-16 11:49:34
modern.js

v3.10.0

What's Changed

Bug Fixes 🐞

Other Changes ✨

Rsbuild Update 📦

更新内容

Bug 修复 🐞

其他变更 ✨

Rsbuild 更新 📦

2026-09-24 02:07:21
modern.js

v3.9.3

What's Changed

New Features 🎉

  • feat(builder): tools.less / tools.sass accept the full Rsbuild plugin options and add tools.svgr, so plugin-level options such as parallel can be configured; the legacy forms keep working and are marked deprecated. in https://github.com/web-infra-dev/modern.js/pull/8881

Bug Fixes 🐞

Other Changes ✨

Rsbuild Update 📦

  • Upgrade @rsbuild/core from v2.2.7 to v2.2.9. See v2.2.8, and v2.2.9 for details.

更新内容

新特性 🎉

Bug 修复 🐞

其他变更 ✨

Rsbuild 更新 📦

  • 升级 @rsbuild/core 从 v2.2.7 到 v2.2.9,查看 v2.2.8和v2.2.9 了解详情。