Conversation
WalkthroughRemoved a CI sed replacement step, changed the demo material path from absolute to relative, and updated material-fetching calls to pass a dynamic Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (5)📚 Learning: 2024-10-10T02:47:46.239ZApplied to files:
📚 Learning: 2025-07-03T09:22:59.512ZApplied to files:
📚 Learning: 2024-09-30T07:51:10.036ZApplied to files:
📚 Learning: 2025-01-14T06:49:00.797ZApplied to files:
📚 Learning: 2025-01-13T07:49:12.136ZApplied to files:
🧬 Code graph analysis (1)packages/design-core/src/preview/src/preview/usePreviewData.ts (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
场景分析: 1.index路径与静态资源域名和路径都不一致 构建命令: 请求路径: baseURL 使用 import.meta.env.BASE_URL(https://domain2/xxxx/) 2.index路径与静态资源域名一致,但路径不一致 构建命令: 请求路径: baseURL 使用 import.meta.env.BASE_URL(/xxxx/) 3.index路径与静态资源域名和路径都一致,但有额外路径 构建命令: 请求路径: baseURL 使用 import.meta.env.BASE_URL('./') 或者 '' 4.index路径与静态资源路径一致,且跟域名一致 构建命令: 请求路径: baseURL 使用 import.meta.env.BASE_URL('./') 或者 '' |
Scenario analysis:
Build command: Request path: baseURL uses import.meta.env.BASE_URL(https://domain2/xxxx/)
Build command: Request path: baseURL uses import.meta.env.BASE_URL(/xxxx/)
Build command: Request path: baseURL use import.meta.env.BASE_URL('./') or ''
Build command: Request path: baseURL use import.meta.env.BASE_URL('./') or '' |
English | 简体中文
PR
问题:
物料文件原本属于前端静态资源,当前被当做后端接口请求(因为使用axios请求该json时统一使用后端接口一致的baseURL),当前后端分离部署时(如部署到cdn)会请求错误的地址
(当前只能通过修改engine.config.js指定完整路径才能实现,但前端静态资源的路径通常是变化的,造成很大的使用麻烦)
解决方法:修正物料请求的baseURL
验证:https://hexqi.github.io/tiny-engine/?type=app&id=1&tenant=1&pageid=3

PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.