Releases: web-infra-dev/modern.js
Releases · web-infra-dev/modern.js
v2.58.3
What's Changed
Bug Fixes 🐞
- fix: should remove extensions for entry file in real entry file, cause developer may use [.server] for ssr bundle entry by @zllkjc in #6116
- fix: custom server hook context request.path should carray query str by @GiveMe-A-Name in #6127
- fix: remove ssr.preload config by @GiveMe-A-Name in #6062
- fix(data-loader): compatible with asyncEntry for data loader by @yimingjfe in #6131
- fix: modern-entry build rules not use array by @caohuilin in #6120
- fix(server): if res was piped, res should be treated as sent by @yimingjfe in #6123
- fix(runtime): status code should be controlled by data loader by @yimingjfe in #6122
- fix: filter entries by ssr or ssg should not apply the sigle entry by @GiveMe-A-Name in #6134
Other Changes
更新内容
Bug 修复 🐞
- fix: 需要移除入口文件的扩展名,因为开发者可能使用 [.server] 作为 ssr 产物的入口文件 由 @zllkjc 实现, 详情可查看 #6116
- fix: custom server hook context request.path 应该带上 query 字符串 由 @GiveMe-A-Name 实现, 详情可查看 #6127
- fix: 移除 ssr.preload 配置 由 @GiveMe-A-Name 实现, 详情可查看 #6062
- fix(data-loader): data loader 的导出兼容 asyncEntry 由 @yimingjfe 实现, 详情可查看 #6131
- fix: modern-entry 构建规则不使用数组 由 @caohuilin 实现, 详情可查看 #6120
- fix(server): 如果响应被 pipe,响应应该被当作已经发送 由 @yimingjfe 实现, 详情可查看 #6123
- fix(runtime): 状态码应该能被 data loader 控制 由 @yimingjfe 实现, 详情可查看 #6122
- fix: 筛选入口不应该应用于单入口情况 由 @GiveMe-A-Name 实现, 详情可查看 #6134
其他变更
v2.58.2
What's Changed
New Features 🎉
- feat: update codesmith version by @caohuilin in #6104
- feat(server): support esm by @yimingjfe in #6028
Bug Fixes 🐞
- fix: we should inject ssrData & window's data when ssr failed, by @GiveMe-A-Name in #6082
- fix: custom server route rewrite should carry honoContext.env by @GiveMe-A-Name in #6109
- fix: fix compatibleRequire problem on windows by @yimingjfe in #6103
- fix: add sideEffect rules for
.modern-js
dir by @caohuilin in #6097 - fix(plugin-swc): function config not works by @9aoy in #6084
更新内容
新特性 🎉
- feat: 更新 codesmith 版本 由 @caohuilin 实现, 详情可查看 #6104
- feat(server): support esm 由 @yimingjfe 实现, 详情可查看 #6028
Bug 修复 🐞
- fix: 当 ssr 降级时,我们应该注入 ssrData 和 window's data 给 runtimeContext.ssrContext 由 @GiveMe-A-Name 实现, 详情可查看 #6082
- fix: custom server 路由重写应该带上 honoContext.env 由 @GiveMe-A-Name 实现, 详情可查看 #6109
- fix: 修复 windows 下 compatibleRequire 的问题 由 @yimingjfe 实现, 详情可查看 #6103
- fix: 对
.modern-js
目录添加 sideEffects 配置 由 @caohuilin 实现, 详情可查看 #6097
v2.58.1
What's Changed
New Features 🎉
- feat(runtime): adapt to some features for async entries by @yimingjfe in #6058
- feat(deps): bump Rsbuild 1.0.1-beta.13 by @chenjiahan in #6070
Bug Fixes 🐞
- fix: should not minify html when disableMinimize in webpack mode by @9aoy in #6063
- fix: ssr context in runtime should get host from X-Forwarded-Host first by @GiveMe-A-Name in #6051
- fix: ssrData should get request.url from ssrContext by @GiveMe-A-Name in #6061
- fix: ssrContext get protocal from x-forwarded-proto first, then new server middleware support rewrite request by @GiveMe-A-Name in #6068
- fix: use flatted instead of safeReplacer by @GiveMe-A-Name in #6044
- fix: garfish config name when use app.config by @caohuilin in #6078
Docs update 📄
- docs: update Rsbuild plugin links by @chenjiahan in #6077
- docs: avoid confusing version number by @chenjiahan in #6054
Other Changes
- test: fix rsbuild inspect config cases by @chenjiahan in #6072
- chore(workflow): no need to build websites by @chenjiahan in #6073
- refactor(website): refactor modern.js docs to latest usage of rspress by @zllkjc in #6007
- chore(workflow): use taze to update rsbuild and rspress by @chenjiahan in #6071
更新内容
新特性 🎉
- feat(runtime): 为异步入口适配某些功能 由 @yimingjfe 实现, 详情可查看 #6058
Bug 修复 🐞
- fix: webpack 模式下,当配置 disableMinimize 时不开启 html 压缩 由 @9aoy 实现, 详情可查看 #6063
- fix: ssr context 应该优先从 X-Forwarded-Host 获取 由 @GiveMe-A-Name 实现, 详情可查看 #6051
- fix: ssrData 应该从 ssrContext 获取 url 由 @GiveMe-A-Name 实现, 详情可查看 #6061
- fix: ssrContext 优先从 x-forwarded-proto 取协议, 另外新 server middleware 支持重写 request 由 @GiveMe-A-Name 实现, 详情可查看 #6068
- fix: 使用 flated 而不是使用 safeReplacer 由 @GiveMe-A-Name 实现, 详情可查看 #6044
- fix: 修复 garfish 配置名称 由 @caohuilin 实现, 详情可查看 #6078
其他变更
v2.58.0
What's Changed
New Features 🎉
- feat: update runtime plugin hook doc by @caohuilin in #6040
- feat(deploy): export nodeFileTrace and traceOptions by @yimingjfe in #6036
- feat: bump rsbuild 1.0.1-beta.9 by @KyrieLii in #6047
- feat: move wrap runtime context provider to render function by @caohuilin in #6029
Bug Fixes 🐞
- fix: we should get ssr data from HTMLElement when set ssr.inlineScript = false by @GiveMe-A-Name in #6038
更新内容
新特性 🎉
- feat: 更行 runtime 插件 hook 函数文档 由 @caohuilin 实现, 详情可查看 #6040
- feat(deploy): 暴露 nodeFileTrace 和 traceOptions 由 @yimingjfe 实现, 详情可查看 #6036
- feat: 将包裹 runtime context provider 的逻辑移动到 render 函数中 由 @caohuilin 实现, 详情可查看 #6029
Bug 修复 🐞
- fix: 当 ssr.inlineScript = false 时,我们应该从 HTMLElement 获取 SSR Data 由 @GiveMe-A-Name 实现, 详情可查看 #6038
v2.57.1
What's Changed
Bug Fixes 🐞
- fix(deploy): the subpath should be judged correctly by @yimingjfe in #6030
- fix: should use dynamic import to import matchRoutes by @yimingjfe in #6033
更新内容
Bug 修复 🐞
- fix(deploy): 应该正确地判断子路径 由 @yimingjfe 实现, 详情可查看 #6030
- fix: 应该使用 动态 import 来引入 matchRoutes 由 @yimingjfe 实现, 详情可查看 #6033
v2.57.0
What's Changed
New Features 🎉
- feat(ssr): support server.ssrByRouteIds by @yimingjfe in #5986
- feat: inject renderHandler to appContext & add default serverPlugins by @GiveMe-A-Name in #6012
- feat(ssg): support ssg with bff.enableHandleWeb by @yimingjfe in #5983
- feat: reexport new dev options by @GiveMe-A-Name in #6004
- feat: refactor runtime plugin hooks by @caohuilin in #5988
- feat: Support Runtime Plugin Communication by @caohuilin in #5988
Bug Fixes 🐞
- fix: data loader support async-node target by @2heal1 in #6016
- fix: more runtime plugin add alias not work by @caohuilin in #6002
- fix: add deferedDataScripts only streaming ssr by @GiveMe-A-Name in #6022
- fix(plugin-garfish): can not import garfish runtime directly which has sideffect by @2heal1 in #5997
- fix: type error when registering Rsbuild plugins by @chenjiahan in #6018
- fix: dev server should call rsbuild.afterListen when listen by @GiveMe-A-Name in #6008
- fix: user can get status in afterRenderContext by @GiveMe-A-Name in #6009
- fix: distPath should from output.distPath.root by @GiveMe-A-Name in #6010
- fix: we should export
getLoaderCtx
from server-core by @GiveMe-A-Name in #6020 - fix:
createDevServer
should not listen port by default by @GiveMe-A-Name in #6000 - fix: mergeConfig function to return an object when the first configuration is not an object by @caohuilin in #6024
- fix: react 17 ssr context error by @caohuilin in #6023
- fix: faviconPlugin should after staticPlugin by @GiveMe-A-Name in #6019
更新内容
新特性 🎉
- feat(ssr): 支持 server.ssrByRouteIds 由 @yimingjfe 实现, 详情可查看 #5986
- feat: 注入 renderHandler 到 appContext & 新增默认 serverPlugins 由 @GiveMe-A-Name 实现, 详情可查看 #6012
- feat(ssg): 支持 ssg 和 bff.enableHandleWeb 一起使用 由 @yimingjfe 实现, 详情可查看 #5983
- feat: 重导出 dev 配置 由 @GiveMe-A-Name 实现, 详情可查看 #6004
- feat: 重构 runtime 插件钩子函数 由 @caohuilin 实现, 详情可查看 #5988
- feat: 支持 Runtime 插件通信 由 @caohuilin 实现, 详情可查看 #5988
Bug 修复 🐞
- fix: 多个 runtime 插件添加 runtime 路径别名时不符合预期 由 @caohuilin 实现, 详情可查看 #6002
- fix: 只有在 streaming ssr 时才添加 deferedDataScripts 由 @GiveMe-A-Name 实现, 详情可查看 #6022
- fix(plugin-garfish): 不能直接注入带有副作用的 garfish runtime 由 @2heal1 实现, 详情可查看 #5997
- fix: dev server 应该在 listen 时,调用 rsbuild.afterListen 由 @GiveMe-A-Name 实现, 详情可查看 #6008
- fix: 用户可以从 afterRenderContext 上拿到 status 由 @GiveMe-A-Name 实现, 详情可查看 #6009
- fix: distPath 应该来自 output.distPath.root 由 @GiveMe-A-Name 实现, 详情可查看 #6010
- fix: 我们应该从 server-core 导出
getLoaderCtx
由 @GiveMe-A-Name 实现, 详情可查看 #6020 - fix:
createDevServer
默认不应该监听端口 由 @GiveMe-A-Name 实现, 详情可查看 #6000 - fix: 修复 mergeConfig 函数,使其在第一个配置非对象时返回对象 由 @caohuilin 实现, 详情可查看 #6024
- fix: 修复 react 17 ssr 找不到 runtimeReactContext 报错 由 @caohuilin 实现, 详情可查看 #6023
- fix: faviconPlugin 应该在 staticPlugin 之后 由 @GiveMe-A-Name 实现, 详情可查看 #6019
v2.56.2
What's Changed
New Features 🎉
- feat: set async entry for data loader entry if enable source.enableAsyncEntry by @2heal1 in #5924
- feat: router v5 and garfish runtime plugin use @meta/runtime path for @modern-js/runtime package by @caohuilin in #5989
Bug Fixes 🐞
- fix: exports more server types by @GiveMe-A-Name in #5995
- fix: handle the case of nft find for error dependencies by @yimingjfe in #5985
- fix: ssrContext.request maybe a undefined by @GiveMe-A-Name in #5991
- fix: resolve.extensions should add .server.jsx when target = node by @GiveMe-A-Name in #5992
- fix: enableAsyncEntry = true, we should generate bootstrap.server.jsx when ssr mode by @GiveMe-A-Name in #5992
更新内容
新特性 🎉
- feat: router v5 和 garfish runtime 插件使用 @meta/runtime 路径导入 @modern-js/runtime 由 @caohuilin 实现, 详情可查看 #5989
Bug 修复 🐞
- fix: 导出更多的 server 类型 由 @GiveMe-A-Name 实现, 详情可查看 #5995
- fix: 处理 nft 查找到错误依赖的情况 由 @yimingjfe 实现, 详情可查看 #5985
- fix: ssrContext.request 可能是 undefined 由 @GiveMe-A-Name 实现, 详情可查看 #5991
- fix: resolve.extensions 应该添加上 .server.jsx 当 target 为 node 时 由 @GiveMe-A-Name 实现, 详情可查看 #5992
- fix: enableAsyncEntry 为 true, 我们应该生成 bootstrap.server.jsx 在 ssr 模式下 由 @GiveMe-A-Name 实现, 详情可查看 #5992
v2.56.1
What's Changed
New Features 🎉
- feat: garfish beforeRender function support props params by @caohuilin in #5970
Bug Fixes 🐞
- fix: new server middleware support get body, if request.method is post by @GiveMe-A-Name in #5972
- fix: storybook port occupied error by @9aoy in #5966
- fix: match unexpected environment resources when artifact with the same name in different environments by @9aoy in #5968
- fix: import plugin api from @modern-js/plugin instead @modern-js/core by @zllkjc in #5974
- fix(ssr): Avoid the compilation problem with renderToPipeableStream and react 17 by @yimingjfe in #5965
- fix: style assets should be add to cssChunk by @GiveMe-A-Name in #5971
- fix: remove unused @loadable/webpack-plugin dependency by @chenjiahan in #5976
更新内容
新特性 🎉
- feat: garfish beforeRender 函数支持 props 参数 由 @caohuilin 实现, 详情可查看 #5970
Bug 修复 🐞
- fix: 如果请求是 post, 新 server middlewares 可以拿到 body 数据 由 @GiveMe-A-Name 实现, 详情可查看 #5972
- fix: 修复 storybook 端口占用报错 由 @9aoy 实现, 详情可查看 #5966
- fix: 当存在同名产物时匹配到不符合预期的 environment 资源 由 @9aoy 实现, 详情可查看 #5968
- fix: 从 @modern-js/plugin 导入插件 api 而不是 @modern-js/core 由 @zllkjc 实现, 详情可查看 #5974
- fix(ssr): 避免 react 17 下,使用 renderToPipeableStream 的编译问题 由 @yimingjfe 实现, 详情可查看 #5965
- fix: style 应该被添加到 cssChunks 由 @GiveMe-A-Name 实现, 详情可查看 #5971
v2.56.0
What's Changed
New Features 🎉
- feat: the runtime path use the meta alias in garfish provider by @caohuilin in #5949
- feat: server monitors interface unity by @GiveMe-A-Name in #5925
- feat: remove lodash dep from runtime mergeConfig function by @caohuilin in #5939
- feat: garfish plugin support custom behavior before render by @caohuilin in #5959
- feat: refactor the logic of the system file router entry by @caohuilin in #5943
Bug Fixes 🐞
- fix(prefetch): chunkId may be string or number by @yimingjfe in #5951
- fix(babel-preset): cjs extension should be js by @chenjiahan in #5952
- fix(plugin-runtime): failed to resolve @rsbuild/core by @chenjiahan in #5950
- fix: router plugin should receive request that method is GET by @GiveMe-A-Name in #5960
- fix: server runtime should get config.disablePrerender from ssr config by @GiveMe-A-Name in #5942
- fix: mockHandler should run before rsbuild middleware & mockHandler can't hmr correctly by @GiveMe-A-Name in #5954
- fix: ssrContext in browser should add document information by @GiveMe-A-Name in #5956
Other Changes
- refactor: bump rsbuild 1.0.0-alpha and use Rsbuild environment config by @9aoy in #5940
- chore: move babel-preset package by @chenjiahan in #5946
- chore(deps): bump rspress to 1.26.1 by @shulaoda in #5948
更新内容
新特性 🎉
- feat: 在 garfish provider 函数中使用 runtime 别名路径 由 @caohuilin 实现, 详情可查看 #5949
- feat: server 监控接口统一 由 @GiveMe-A-Name 实现, 详情可查看 #5925
- feat: mergeConfig 函数移除 lodash 依赖 由 @caohuilin 实现, 详情可查看 #5939
- feat: garfish 插件支持在 render 前自定义行为 由 @caohuilin 实现, 详情可查看 #5959
- feat: 重构文件系统路由入口逻辑 由 @caohuilin 实现, 详情可查看 #5943
Bug 修复 🐞
- fix(prefetch): chunkId 可能是 sstring 或 number 由 @yimingjfe 实现, 详情可查看 #5951
- fix: router 插件应该获得请求方法为 GET 的请求 由 @GiveMe-A-Name 实现, 详情可查看 #5960
- fix: server runtime 应该从 ssrconfig 获取 config.disablePrerender 由 @GiveMe-A-Name 实现, 详情可查看 #5942
- fix: mockHandler 应该在 rsbuild middleware 之前跑 & mockHandler 不能正确的 hmr 由 @GiveMe-A-Name 实现, 详情可查看 #5954
- fix: 在浏览器中的 ssrContext 应该添加 document 的信息 由 @GiveMe-A-Name 实现, 详情可查看 #5956
v2.55.0
What's Changed
New Features 🎉
- feat: generator support runtime config file by @caohuilin in #5916
- feat: update entry doc by @caohuilin in #5874
- feat: garfish plugin support append entry code by @caohuilin in #5914
- feat: refactor runtime brower entry by @caohuilin in #5839
Bug Fixes 🐞
- fix: garfish plugin use custom bootstrap not work by @caohuilin in #5933
- fix: isbot v4.x require nodev18, so we downgrade it into v3.x by @GiveMe-A-Name in #5915
- fix: should use server-entires when target === 'node', 'web-worker', 'service-worker' by @GiveMe-A-Name in #5919
- fix: prod-server support source-map by @GiveMe-A-Name in #5930
- fix: runtime template windows path by @caohuilin in #5912
- fix(module-tools): the imports field which is handled as url by @SoonIter in #5923
- fix: add bff/tailwindcss/swc plugin exported types by @zllkjc in #5926
- fix: ssr use-loader should set _internal_context.ssr = false by @GiveMe-A-Name in #5935
- fix: re-export runtime server by @GiveMe-A-Name in #5932
- fix: make sure that BFF run products of the dist when building with ssg by @yimingjfe in #5909
- fix: cacheProvider support return false by @GiveMe-A-Name in #5905
Other Changes
更新内容
新特性 🎉
- feat: 生成器支持 modern.runtime 配置文件 由 @caohuilin 实现, 详情可查看 #5916
- feat: 更新入口相关文档 由 @caohuilin 实现, 详情可查看 #5874
- feat: garfish 插件支持补充入口代码 由 @caohuilin 实现, 详情可查看 #5914
- feat: 重构客户端入口 由 @caohuilin 实现, 详情可查看 #5839
Bug 修复 🐞
- fix: 修复 garfish 插件使用 custom bootstrap 不生效问题 由 @caohuilin 实现, 详情可查看 #5933
- fix: isbot v4.x 需要 nodev18, 所以我们把他降级为 v3.x 由 @GiveMe-A-Name 实现, 详情可查看 #5915
- fix: 当 target 为 'node', 'web-worker', 'service-worker' 应该使用 server 入口. 由 @GiveMe-A-Name 实现, 详情可查看 #5919
- fix: prod-server 支持 source-map 由 @GiveMe-A-Name 实现, 详情可查看 #5930
- fix: 修复 runtime 模板 windows 路径不正确 由 @caohuilin 实现, 详情可查看 #5912
- fix(module-tools): imports field 被认为了 url 由 @SoonIter 实现, 详情可查看 #5923
- fix: 添加 bff/tailwindcss/swc 插件的导出类型 由 @zllkjc 实现, 详情可查看 #5926
- fix: ssr use-loader 应该将 _internal_context.ssr 为 false 由 @GiveMe-A-Name 实现, 详情可查看 #5935
- fix: 重导出 runtime server 由 @GiveMe-A-Name 实现, 详情可查看 #5932
- fix: make sure that BFF run products of the dist when building with ssg 由 @yimingjfe 实现, 详情可查看 #5909
- fix: cacheProvider 支持返回 false 由 @GiveMe-A-Name 实现, 详情可查看 #5905