| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-08-06 | 5.4 kB | |
| v3.8.0 source code.tar.gz | 2026-08-06 | 3.7 MB | |
| v3.8.0 source code.zip | 2026-08-06 | 5.7 MB | |
| Totals: 3 Items | 9.4 MB | 0 | |
What's Changed
New Features 🎉
- 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
Bug Fixes 🐞
- 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
Other Changes ✨
- 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
Bug 修复 🐞
- 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