-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Task] codeSplitting shared 分组出现重复的报错问题 #12036
Comments
@xierenyuan 关于文中提到的 chunk 为 有时间了辛苦可以看下 🌹 |
|
请问你是怎么解决的这个问题@fz6m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
说明
当
codeSplitting
的 js 分包策略采用granularChunks
时,由于shared
分组没有任何test
限制条件,可能会发生 chunk 重复的问题:umi/packages/preset-umi/src/features/codeSplitting/codeSplitting.ts
Lines 123 to 139 in 41f1908
目前得知会报错的情况:
chunk
为null
导致shared-nullnullnull
命名重复,出现冲突的情况 from @xierenyuan之前我在哪个 issue 还是 discussion 看到过有人反馈会报错,找不到了
目前期望的解决方案:
去掉
shared
分组,因为它没有任何限制,难免出现无法定位的情况(如chunk
为空)。(此方案 @xierenyuan 认为会大幅影响 CDN 覆盖率,因为产物结构有很大变化)。给
shared
添加test
限制。找到
chunk
为null
会出现问题的最小复现,尝试对null
的使用文件路径作为 id 计算 hash 继续弥补此方案。The text was updated successfully, but these errors were encountered: