Skip to content

Conversation

@poozhu
Copy link

@poozhu poozhu commented Oct 19, 2025

@vercel
Copy link

vercel bot commented Oct 19, 2025

@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.

if (process.env.UMI_DEV_SERVER_COMPRESS !== 'none') {
if (
process.env.UMI_DEV_SERVER_COMPRESS !== 'none' &&
process.env.DUMI_DEV_SERVER_COMPRESS !== 'none'
Copy link
Member

Choose a reason for hiding this comment

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

这里感觉有点历史设计问题,bundler 作为独立子包不应该直接感知 Umi 上层环境变量(以及跨仓库的 dumi 环境变量),接收参数更合适,但不确定是否影响已有项目

要么改 dumi 层吧,收到环境变量重新赋值给 UMI_DEV_SERVER_COMPRESS,可能合适的位置:https://github.com/umijs/dumi/blob/1e5d8d8ddf0afeaa2cd060b654c630d1c261045f/src/service/service.ts#L12

@poozhu
Copy link
Author

poozhu commented Oct 21, 2025

没怎么详细看代码, dumi 内部有做 环境变量转 umi 变量的模块吗, 如果没有的话, 文档上的 DUMI_ 开头的环境变量会不会没生效
https://d.umijs.org/config/env#dumi_env

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.

2 participants