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(SSR): 防止多chunk情况下(有懒加载时)的文件名冲突报错 #11823

Merged
merged 50 commits into from
Nov 2, 2023
Merged

fix(SSR): 防止多chunk情况下(有懒加载时)的文件名冲突报错 #11823

merged 50 commits into from
Nov 2, 2023

Conversation

gwuhaolin
Copy link
Member

No description provided.

奇风 and others added 30 commits October 8, 2023 12:00
奇风 and others added 19 commits October 18, 2023 13:00
Copy link

vercel bot commented Nov 2, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
umi ⬜️ Ignored (Inspect) Visit Preview Nov 2, 2023 8:00am

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (352b0a8) 29.02% compared to head (be1cb28) 29.02%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #11823   +/-   ##
=======================================
  Coverage   29.02%   29.02%           
=======================================
  Files         488      488           
  Lines       14829    14829           
  Branches     3513     3513           
=======================================
  Hits         4304     4304           
  Misses       9765     9765           
  Partials      760      760           
Files Coverage Δ
...ges/preset-umi/src/features/ssr/webpack/webpack.ts 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -46,9 +46,10 @@ export const build = async (api: IApi, opts: any) => {

memo.output
.path(dirname(absOutputFile))
.filename(useHash ? 'umi.[contenthash:8].server.js' : 'umi.server.js')
// 防止多chunk情况下(有懒加载时)的文件名冲突报错
.filename(useHash ? '[name].[contenthash:8].server.js' : '[name].server.js')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ssr 下会默认把 dynamic import 转换,理论上不会出现多 chunk:

bundlerOpts.extraBabelPlugins.push([
require.resolve('babel-plugin-dynamic-import-node'),
{},
'umi-server-dynamic-import-node',
]);

可以提供复现看看是什么原因引起的

@sorrycc sorrycc merged commit 553711a into umijs:master Nov 2, 2023
14 checks passed
@fz6m
Copy link
Contributor

fz6m commented Nov 2, 2023

下次提代码的时候不要带着之前的 commit 记录,一大串很丑,可以通过设定新的 remote 然后每次从上游 master 拉新的分支开发就好:

  git remote add up https://github.com/umijs/umi.git
  # ↑ 在自己 fork 的仓库里这样添加一个上游,下次先同步所有远程仓库信息后,从 up/master checkout 新分支。

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.

4 participants