fix: 新增 dumi 场景下, DUMI_DEV_SERVER_COMPRESS 的环境变量判断#13155
Open
poozhu wants to merge 1 commit into
Open
Conversation
|
@poozhu is attempting to deploy a commit to the chencheng's projects Team on Vercel. A member of the Team first needs to authorize it. |
PeachScript
reviewed
Oct 21, 2025
| if (process.env.UMI_DEV_SERVER_COMPRESS !== 'none') { | ||
| if ( | ||
| process.env.UMI_DEV_SERVER_COMPRESS !== 'none' && | ||
| process.env.DUMI_DEV_SERVER_COMPRESS !== 'none' |
Member
There was a problem hiding this comment.
这里感觉有点历史设计问题,bundler 作为独立子包不应该直接感知 Umi 上层环境变量(以及跨仓库的 dumi 环境变量),接收参数更合适,但不确定是否影响已有项目
要么改 dumi 层吧,收到环境变量重新赋值给 UMI_DEV_SERVER_COMPRESS,可能合适的位置:https://github.com/umijs/dumi/blob/1e5d8d8ddf0afeaa2cd060b654c630d1c261045f/src/service/service.ts#L12
Author
|
没怎么详细看代码, dumi 内部有做 环境变量转 umi 变量的模块吗, 如果没有的话, 文档上的 DUMI_ 开头的环境变量会不会没生效 |
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.
umijs/dumi#2300