Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: alias layout file resolve bug since [email protected] #1935

Merged
merged 2 commits into from
Oct 12, 2023

Conversation

PeachScript
Copy link
Member

@PeachScript PeachScript commented Oct 9, 2023

🤔 这个变动的性质是?/ What is the nature of this change?

  • 新特性提交 / New feature
  • bug 修复 / Fix bug
  • 样式优化 / Style optimization
  • 代码风格优化 / Code style optimization
  • 性能优化 / Performance optimization
  • 构建优化 / Build optimization
  • 网站、文档、Demo 改进 / Website, documentation, demo improvements
  • 重构代码或样式 / Refactor code or style
  • 测试相关 / Test related
  • 其他 / Other

🔗 相关 Issue / Related Issue

Close #1932

💡 需求背景和解决方案 / Background or solution

问题背景:之前 dumi 为了解 chunk name 引起的 CDN 资源托管问题(包括但不限于 #1487 ),用 alias 实现了 chunk name 的优化(见 #1601 ),但这个实现的前提是 layouts 不会被 server loader 处理,因为 server loader 解析 route component 时不会处理 alias,在 umijs/umi#11666 后 layouts 也会被 server loader 处理,导致 4.0.84 发布后 dumi 应用报错

解决方案:不再使用别名的形式来配置路由组件,这种用法与 Umi 最新的改动会冲突,在 Umi 发版后会导致 dumi 编译失败;改为使用绝对路径来配置路由组件,把 chunk name 的简化逻辑交给 Umi 来做 umijs/umi#11716

📝 更新日志 / Changelog

Language Changelog
🇺🇸 English Fix alias layout file resolve bug since [email protected]
🇨🇳 Chinese 修复别名 layout 组件在 [email protected] 中解析失败的问题

@vercel
Copy link

vercel bot commented Oct 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2023 1:52am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: 从1.x升级到2.x出现 "Cannot find module '../dumi__theme/ContextWrapper'"错误
1 participant