Skip to content

v2.46.0

Compare
Choose a tag to compare
@caohuilin caohuilin released this 18 Jan 02:57

What's Changed

Performance Improvements ⚡

  • perf(module-tools): skip build js and d.ts when input is empty by @10Derozan in #5226
  • perf(module-tools): log error detail which may throw by own plugin and complete error stack by @10Derozan in #5230

New Features 🎉

  • feat: server template support edge case by @spencerHT in #5202
  • feat: set default vue hydration mismatch flag by @tmkx in #5185
  • feat: Waiting for all content to load for spiders in streaming ssr by @GiveMe-A-Name in #5186
  • feat: use rsbuild(uni-builder) instead of modern.js builder by @9aoy in #5168
  • feat: bump Rsbuild 0.3.3 and Rspack 0.5.0 by @9aoy in #5244
  • feat(uni-builder): support passing source build options by @chenjiahan in #5225

Bug Fixes 🐞

  • fix(prod-server): ssr cache can't work in serve command by @GiveMe-A-Name in #5197
  • fix(prod-server): isBot@4.x need nodev18, so we downgrade it to 3.x by @GiveMe-A-Name
  • fix(runtime-utils): FileReader#reset didn't clear storage as expected by @xc2 in #5187
  • fix(plugin-router-v5): move @modern-js/runtime-utils to dependencies by @KyrieLii in #5234
  • fix(module-tools): remove function type in transformImport by @10Derozan in #5220
  • fix: resolve warning 'Failed to resolve encoding' in node-fetch by @9aoy in #5238
  • fix(uni-builder): make the plugins type looser to avoid type mismatch by @9aoy in #5216

Other Changes

  • refactor: dataflow of devtools client by @Asuka109 in #5222
  • chore(builder-related): add deprecated warning for builder related packages, please use rsbuild instead by @9aoy in #5204
  • chore(module-tools): upgrade rollup and rollup-plugin-dts version by @10Derozan in #5199
  • chore: remove tools.inspector api, please use rsdoctor instead by @9aoy in #5194
  • chore(module-tools): prebundle svgr to reduce install size by @10Derozan in #5192
  • chore(module-tools): add babel dep, because @svgr/plugin-jsx depended after prebundle by @10Derozan in #5211
  • chore(module-tools): upgrade ast-grep 0.16.0 to support win32-arm64 by @10Derozan in #5190
  • chore: explicitly declare Node version of babel target by @chenjiahan in #5200

更新内容

性能优化 ⚡

  • perf(module-tools): 当没有入口时跳过构建 js 和 d.ts 文件 由 @10Derozan 实现, 详情可查看 #5226
  • perf(module-tools): 补齐错误栈并且打印错误细节,因为这错误可能并不是 esbuild 抛出的,而是我们自己的插件抛出的 由 @10Derozan 实现, 详情可查看 #5230

新特性 🎉

  • feat: 服务端模版方法支持 的边界case 由 @spencerHT 实现, 详情可查看 #5202
  • feat: 设置默认 vue hydration mismatch flag 由 @tmkx 实现, 详情可查看 #5185
  • feat: 在 streaming ssr 时,为爬虫等待所有内容加载完毕 由 @GiveMe-A-Name 实现, 详情可查看 #5186
  • feat: 将应用工程的构建工具从 modern.js builder 切换为 rsbuild(uni-builder) 由 @9aoy 实现, 详情可查看 #5168
  • feat: 升级 Rsbuild 0.3.3 和 Rspack 0.5.0 由 @9aoy 实现, 详情可查看 #5244
  • feat(uni-builder): 支持传入 source build 配置项 由 @chenjiahan 实现, 详情可查看 #5225

Bug 修复 🐞

  • fix(prod-server): ssr 缓存不能在 serve 指令中正常工作 由 @GiveMe-A-Name 实现, 详情可查看 #5197
  • fix(prod-server): isBot@4.x 需要 nodev18, 所以我们降级到 3.x 由 @GiveMe-A-Name 实现
  • fix(runtime-utils): FileReader#reset 没有按预期清除缓存的问题。 由 @xc2 实现, 详情可查看 #5187
  • fix(plugin-router-v5): 移动 @modern-js/runtime-utils 到 dependencies 由 @KyrieLii 实现, 详情可查看 #5234
  • fix(module-tools): 移除 transformImport 配置里的函数类型 由 @10Derozan 实现, 详情可查看 #5220
  • fix: 修复在使用 node-fetch 时的 'Failed to resolve encoding' resolve warning 由 @9aoy 实现, 详情可查看 #5238
  • fix(uni-builder): 使用更松散的 plugins 类型来避免 type 不匹配的问题 由 @9aoy 实现, 详情可查看 #5216

其他变更

  • refactor: 重构 devtools 客户端数据流 由 @Asuka109 实现, 详情可查看 #5222
  • chore(builder-related): 为 builder 相关包添加废弃声明,推荐使用 rsbuild 代替 由 @9aoy 实现, 详情可查看 #5204
  • chore(module-tools): 更新 rollup 和 rollup-plugin-dts 版本 由 @10Derozan 实现, 详情可查看 #5199
  • chore: 移除 tools.inspector api, 可使用 rsdoctor 代替 由 @9aoy 实现, 详情可查看 #5194
  • chore(module-tools): 预打包 svgr 以减小安装体积 由 @10Derozan 实现, 详情可查看 #5192
  • chore(module-tools): 新增 babel 依赖,因为预打包后的 @svgr/plugin-jsx 需要这些依赖 由 @10Derozan 实现, 详情可查看 #5211
  • chore: 显式声明 babel 的目标 Node 版本 由 @chenjiahan 实现, 详情可查看 #5200