Skip to content

Releases: web-infra-dev/modern.js

v2.66.0

26 Mar 21:59
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: static middleware support dev.assetPrefix by @zllkjc in #6972
  • feat: rename ServerPlugin to ServerPluginLegacy and ServerPluginFuture to ServerPlugin by @caohuilin in #6851
  • feat: server plugin use plugin v2 by @caohuilin in #6851

Docs update 📄

更新内容

新特性 🎉

  • feat: 静态资源中间件支持 dev.assetPrefix 由 @zllkjc 实现, 详情可查看 #6972
  • feat: 将 ServerPlugin 类型重命名为 ServerPluginLegacy,ServerPluginFuture 类型重命名为 ServerPlugin 由 @caohuilin 实现, 详情可查看 #6851
  • feat: server 插件使用 plugin v2 实现 由 @caohuilin 实现, 详情可查看 #6851

文档更新 📄

  • docs: 提升 Modern.js Plugin 文档 由 @caohuilin 实现, 详情可查看 #6938

v2.65.5

21 Mar 02:36
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: improve support rsc with rspack by @yimingjfe in #6931
  • feat: garfish provider support add appName props by @caohuilin in #6957
  • feat: Add response APIs to support setting response headers, status codes, and redirects by @yimingjfe in #6931

Bug Fixes 🐞

  • fix: fix the compatibility issue of the garfish plugin rendering nodes by @caohuilin in #6939
  • fix: add new mid connet for mock handler by @zllkjc in #6955
  • fix: route.json html entry path when config html.outputStructure by @caohuilin in #6950
  • fix: postcss.config not works by @9aoy in #6670
  • fix(cache): handle different functions with same parameters for cache function by @yimingjfe in #6951

更新内容

新特性 🎉

  • feat: 完善 rspack 下对 rsc 的支持 由 @yimingjfe 实现, 详情可查看 #6931
  • feat: garfish provider 支持添加 appName props 由 @caohuilin 实现, 详情可查看 #6957
  • feat: 添加一些响应的 API,可以设置响应头,状态码,及重定向 由 @yimingjfe 实现, 详情可查看 #6931

Bug 修复 🐞

  • fix: 修复 garfish 插件渲染节点兼容性问题 由 @caohuilin 实现, 详情可查看 #6939
  • fix: 修复当配置 html.outputStructure 为 flat 时,route.json 中 html 入口文件路径 由 @caohuilin 实现, 详情可查看 #6950
  • fix(cache): 正确处理使用 cache 函数时,不同函数,相同参数的 case 由 @yimingjfe 实现, 详情可查看 #6951

v2.65.4

13 Mar 02:47
dcc65ad
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: rename runtime plugin modifyRuntimeConfig hook to config by @caohuilin in #6928
  • feat: use require.resolve to check react version to fix use pnpm catalog in pnpm workspace by @caohuilin in #6919
  • feat: Modern.js server static middleware should always use system fs by @zllkjc in #6924
  • feat: support watch mode in modern build by @9aoy in #6470

Bug Fixes 🐞

  • fix: should not escape windows path when use transformLodash by @9aoy in #6910

更新内容

新特性 🎉

  • feat: 重命名 runtime 插件 modifyRuntimeConfig 钩子为 config 由 @caohuilin 实现, 详情可查看 #6928
  • feat: 使用 require.resolve 来检查 react 版本,以修复 pnpm workspace 中使用 pnpm catalog 的问题 由 @caohuilin 实现, 详情可查看 #6919
  • feat: Modern.js 的静态中间件应该始终使用系统 fs 由 @zllkjc 实现, 详情可查看 #6924

v2.65.3

06 Mar 00:25
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: defineRuntimeConfig supports function parameters and multiple entry configuration by @caohuilin in #6895
  • feat: export getMonitors for server component by @yimingjfe in #6896
  • feat: Add response APIs to support setting response headers, status codes, and redirects by @yimingjfe in #6902

Bug Fixes 🐞

  • fix: requestContext should be add on runtimeContext before init by @zllkjc in #6898

Docs update 📄

更新内容

新特性 🎉

  • feat: defineRuntimeConfig 支持函数参数及配置多入口 由 @caohuilin 实现, 详情可查看 #6895
  • feat: 为 server component 暴露 getMonitors 由 @yimingjfe 实现, 详情可查看 #6896
  • feat: 添加一些响应的 API,可以设置响应头,状态码,及重定向 由 @yimingjfe 实现, 详情可查看 #6902

Bug 修复 🐞

  • fix: requestContext 应该在 init 前添加到 runtimeContext 由 @zllkjc 实现, 详情可查看 #6898

文档更新 📄

  • docs: 添加 monitors API 使用文档 由 @zllkjc 实现, 详情可查看 #6903

v2.65.2

27 Feb 06:51
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: use assign to update context by @caohuilin in #6885
  • feat: support get monitors in Data Loader and Component by @zllkjc in #6844
  • feat(runtime): support cache function & getRequest function by @yimingjfe in #6848

Bug Fixes 🐞

  • fix(render): fork react-server-dom-webpack to avoid warnings about installing dependencies by @yimingjfe in #6880

Other Changes

  • chore: use monitors instead of reporter to report Data Loader cost by @zllkjc in #6886
  • chore: remove reporter.init and use Monitors to report request cost by @zllkjc in #6883

更新内容

新特性 🎉

  • feat: 使用 assign 函数更新 context 信息 由 @caohuilin 实现, 详情可查看 #6885
  • feat: 在 Data Loader 和组件中支持获取 monitors 由 @zllkjc 实现, 详情可查看 #6844
  • feat(runtime): 支持 cache 函数 和 getRequest 函数 由 @yimingjfe 实现, 详情可查看 #6848

Bug 修复 🐞

  • fix(render): 内置 react-server-dom-webpack 到 packages/toolkit/utils/compiled 中,避免安装依赖的警告 由 @yimingjfe 实现, 详情可查看 #6880

其他变更

  • chore: 使用 monitors 代替 reporter 来上报 Data Loader 耗时 由 @zllkjc 实现, 详情可查看 #6886
  • chore: 移除 reporter.init 并且使用 Monitors 上报请求耗时 由 @zllkjc 实现, 详情可查看 #6883

v2.65.1

21 Feb 12:30
Compare
Choose a tag to compare

What's Changed

Bug Fixes 🐞

  • fix: update rsbuild styled-components plugin by @zllkjc in #6853

更新内容

Bug 修复 🐞

  • fix: 更新 rsbuild styled-components 插件 由 @zllkjc 实现, 详情可查看 #6853

v2.65.0

20 Feb 00:54
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: BFF 跨项目调用支持配置域名,补充文档 by @keepview in #6803
  • feat: pass through the body, when query is pass_body by @yimingjfe in #6841
  • feat: support rsbuild modify config hook by @caohuilin in #6840

Bug Fixes 🐞

  • fix: support add frameworkConfigPath to buildCache.buildDependencies when rspack build by @9aoy in #6839
  • fix(bff): fixed path issue of generating package.json attribute by @keepview in #6843

更新内容

新特性 🎉

  • feat: BFF cross-project-invocation supports configuration of domain, add doc 由 @keepview 实现, 详情可查看 #6803
  • feat: 透传 body,当 query 为 pass_body 时 由 @yimingjfe 实现, 详情可查看 #6841
  • feat: 支持 rsbuild 修改配置的 Hook 函数 由 @caohuilin 实现, 详情可查看 #6840

Bug 修复 🐞

  • fix(bff): 修复生成 package.json 属性的路径问题 由 @keepview 实现, 详情可查看 #6843

v2.64.3

17 Feb 11:02
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat(server): allow x-parse-through-body header to parse through the body of req by @yimingjfe in #6836

Bug Fixes 🐞

  • fix(router): compatible with splitRouteChunks is false in react17 + csr by @yimingjfe in #6827

更新内容

新特性 🎉

  • feat(server): 添加 x-parse-through-body 以透传请求体 由 @yimingjfe 实现, 详情可查看 #6836

Bug 修复 🐞

  • fix(router): 在 react17 和 csr 模式下,兼容 splitRouteChunks 为 false 的情况 由 @yimingjfe 实现, 详情可查看 #6827

v2.64.2

12 Feb 23:22
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: bump rsbuild & rspack 1.2.x by @9aoy in #6821
  • feat: unify server monitors usage, add error logger for data loader by @zllkjc in #6818
  • feat: move modifyServerRoutes hook to plugin v2 by @caohuilin in #6800

Bug Fixes 🐞

  • fix: add server.logger to control internal server logger by @zllkjc in #6812
  • fix: plugin v2 runtime export add node config by @caohuilin in #6819
  • fix(dev-server): apply dev configuration, then void dev.setupMiddlewares config lost by @GiveMe-A-Name in #6799
  • fix: types for custom server hook by @yimingjfe in #6823
  • fix: compat chain.cache true by @9aoy in #6824

Other Changes

  • chore: support serve command use custom serve launcher by @zllkjc in #6817

更新内容

新特性 🎉

  • feat: 统一 server 监控的使用方式,为 data loader 添加错误日志 由 @zllkjc 实现, 详情可查看 #6818
  • feat: 将 modifyServerRoutes 钩子函数移动到 plugin v2 中 由 @caohuilin 实现, 详情可查看 #6800

Bug 修复 🐞

  • fix: 添加 server.logger 配置来控制 Server 内部日志 由 @zllkjc 实现, 详情可查看 #6812
  • fix: plugin v2 runtime 导出增加 node 配置 由 @caohuilin 实现, 详情可查看 #6819
  • fix(dev-server): 应用 dev 配置防止 dev.setupMiddlewares 丢失 由 @GiveMe-A-Name 实现, 详情可查看 #6799
  • fix: 自定义 server 的 hook 类型 由 @yimingjfe 实现, 详情可查看 #6823

其他变更

  • chore: 支持 serve 命令使用自定义启动器 由 @zllkjc 实现, 详情可查看 #6817

v2.64.1

06 Feb 03:40
Compare
Choose a tag to compare

What's Changed

New Features 🎉

  • feat: use jiti to read config file for supporting esm import by @caohuilin in #6751
  • feat: load env in appTools when before the first time load modern config by @zllkjc in #6774
  • feat: add warning for twin.macro v2 usage by @caohuilin in #6762
  • feat: migrate _internalRuntimePlugins and _internalServerPlugins hooks to plugin v2 by @caohuilin in #6779
  • feat: cli plugin support ExtendConfigUtils by @caohuilin in #6752

Bug Fixes 🐞

  • fix: remove register esbuild in registerEsm & should log status correctly by @yimingjfe in #6754

更新内容

新特性 🎉

  • feat: 使用 jiti 读取配置文件,支持 esm 导入 由 @caohuilin 实现, 详情可查看 #6751
  • feat: 在 appTools 在第一次加载 modern config 之前,加载环境变量 由 @zllkjc 实现, 详情可查看 #6774
  • feat: twin.macro v2 使用添加警告信息 由 @caohuilin 实现, 详情可查看 #6762
  • feat: 迁移 _internalRuntimePlugins 和 _internalServerPlugins hook 函数到 plugin-v2 由 @caohuilin 实现, 详情可查看 #6779
  • feat: cli 插件支持扩展 config 工具函数 由 @caohuilin 实现, 详情可查看 #6752

Bug 修复 🐞

  • fix: 移除在 registerEsm 中注册 esbuild & 正确地打印 status 由 @yimingjfe 实现, 详情可查看 #6754