-
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
fix(SSR): 防止多chunk情况下(有懒加载时)的文件名冲突报错 #11823
Conversation
Co-authored-by: chencheng (云谦) <[email protected]>
以解决 react-dom/server renderToReadableStream 不存在的问题
… Workers的平台" This reverts commit 5b0946a.
Co-authored-by: 咲奈Sakina <[email protected]>
Co-authored-by: 咲奈Sakina <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Codecov ReportAttention:
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
☔ View full report in Codecov by Sentry. |
@@ -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') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ssr 下会默认把 dynamic import 转换,理论上不会出现多 chunk:
umi/packages/preset-umi/src/features/ssr/webpack/webpack.ts
Lines 24 to 28 in fb0a75f
bundlerOpts.extraBabelPlugins.push([ | |
require.resolve('babel-plugin-dynamic-import-node'), | |
{}, | |
'umi-server-dynamic-import-node', | |
]); |
可以提供复现看看是什么原因引起的
下次提代码的时候不要带着之前的 commit 记录,一大串很丑,可以通过设定新的 remote 然后每次从上游 master 拉新的分支开发就好: git remote add up https://github.com/umijs/umi.git
# ↑ 在自己 fork 的仓库里这样添加一个上游,下次先同步所有远程仓库信息后,从 up/master checkout 新分支。 |
No description provided.