fix: isolate classic frontend install in Makefile to match Docker#5790
Open
feitianbubu wants to merge 1 commit into
Open
fix: isolate classic frontend install in Makefile to match Docker#5790feitianbubu wants to merge 1 commit into
feitianbubu wants to merge 1 commit into
Conversation
Contributor
WalkthroughThe Classic Frontend Build Cleanup
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 变更描述 / Description
本地用
make build-all-frontends构建后,classic(旧版)主题的数据看板会白屏崩溃:Cannot read properties of undefined (reading 'createCanvas')。根因:
web/是 bun workspace,classic 走全量bun install时,default 主题的vrender-core@1.0.45(VChart 2.0)占住了顶层 hoist 位,把 classic 用的vrender-core@0.17.17(VChart 1.8)挤成了多份嵌套副本。vrender-core 的container/application是模块级单例,多份副本会让 DI 容器分裂——浏览器环境注册到其中一份,渲染时却读到另一份的空envContribution,于是createCanvas取到 undefined 报错。Dockerfile的builder-classic阶段本来就用bun install --filter ./classic(独立容器、只装 classic),所以官方 Docker 镜像不受影响。这个 PR 把make build-frontend-classic对齐成同样的隔离安装(构建前清掉 node_modules,再--filter ./classic),让本地构建产物和 Docker 一致。🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
make构建与 Docker 不一致导致的工具链问题,官方镜像无此现象。✅ 提交前检查项 / Checklist
make构建,官方 Docker 镜像不受影响makefile一行📸 运行证明 / Proof of Work
以 classic 构建产物里 vrender-core 的副本数衡量(看 chunk 内
getCommonCanvas出现次数,单份=正常):make build-all-frontends:classic chunkgetCommonCanvas= 10(多份分裂)→ 看板崩溃getCommonCanvas= 2(单份,与 default 新版主题一致)→ 看板正常Summary by CodeRabbit