-
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
feature: SSR模式下,多输出一份和index.html完全一致的*.html文件,用于ER场景 #11723
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
53f38f2
fix: dev环境构建SSR server.js时,环境判断错误导致输出的dev产物带上了hash
7f6d6d5
Update packages/preset-umi/src/features/ssr/webpack/webpack.ts
gwuhaolin 5d004a1
fix: dev环境构建SSR server.js时,环境判断错误导致输出的dev产物带上了hash
3fc62cf
Merge branch 'umijs:master' into master
gwuhaolin 5b0946a
feature: 支持自定义SSR构建目标,默认为node,可配置为webworker以支持运行在类似Cloudflare Workers的平台
7fe8bdc
feature: getManifest支持传入sourceDir表示SSR产物目录
542304a
feature: getManifest支持传入sourceDir表示SSR产物目录
335e6a6
fix: rendertoreadablestream is not a function
e7fb0c1
Revert "feature: 支持自定义SSR构建目标,默认为node,可配置为webworker以支持运行在类似Cloudflare…
64a9a42
fix: rendertoreadablestream is not a function
bfcd087
Update packages/server/src/ssr.ts
gwuhaolin d1a6e33
Update packages/server/src/ssr.ts
gwuhaolin e9ced7f
fix: 还原g_getAssets
a496ec7
Merge branch 'umijs:master' into master
gwuhaolin 1ab01c4
fix: 被执行时才调用getManifest(),避免在入口立即调用getManifest()
af6b87f
fix: 被执行时才调用getManifest(),避免在入口立即调用getManifest()
aceacd1
fix: 被执行时才调用getManifest(),避免在入口立即调用getManifest()
0f9f649
Merge branch 'umijs:master' into master
gwuhaolin a55b708
feature: SSR模式下,多输出一份和index.html完全一致的*.html文件,用于ER场景
d572247
feature: SSR模式下,多输出一份和index.html完全一致的*.html文件,用于ER场景
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
这个地方非常不清真。
首先这是用户非预期的文件,我们不应该生成大部分用户不需要的文件,这部分特定于 serverless 的可以做到 bigfish 里或者单独的 serverless plugin 或 preset 里去,而不应该污染源代码库造成所有人都有这个副作用。
其次有的人可能对 html 产物做了修改,这里复制了
index.html
其实用户会得到两个不一样的 html 产物,会造成非常大的疑惑,是黑盒。另外标准存在不一致,社区内对于 404 fallback 的默认行为是 找不到会使用
404.html
,而这里是*.html
,不符合社区共识。改进意见
或
ssr: { er: true }
选项来开启这个生成功能,以后所有的副作用做到这个选项开启内。