Files
creator-hub/web/.umirc.ts
T
rogee ca919c3307
douyin-release-gate / verify (push) Failing after 3m3s
fix(web): 显式关闭 umi icons 特性,消除 dev 启动偶发整屏 esbuild ERROR
根因:@umijs/max 内建的 icons 预构建会在启动早期用 esbuild 扫描源码、
按别名解析 src/.umi 临时产物;窗口期内临时文件未就绪即报
"Could not resolve src/.umi/umi.ts"、"Can't resolve .umi/exports" 等
整屏 ERROR(webpack 编译与页面功能不受影响)。上游同类竞态的已知问题
(umijs/umi#10339 修过一处同类)。本项目图标全部直接来自 @ant-design/icons,
不使用该特性,故显式 icons: false 关闭,扫描进程不再启动。
2026-09-23 14:20:41 +08:00

20 lines
832 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from '@umijs/max';
export default defineConfig({
// 多入口 async chunk 间 esbuild helper 冲突(esbuild#3818,checker 直接 fatal 退出);改用 terser 压缩器绕开
jsMinifier: "terser",
// ant-design-pro 同构:约定式路由 + max 内建能力
// MFSU 在本机反复出现 mfsu-virtual-entry 解析不到 src/.umi/umi.ts 的缓存问题,直接关闭(正确性优先)
mfsu: false,
proxy: {
'/api': {
target: 'http://127.0.0.1:8082',
changeOrigin: true,
},
},
npmClient: 'npm',
// 未使用 @umijs/max 的 icons 能力(图标全部来自 @ant-design/icons),显式关闭:
// 该特性的 esbuild 预构建扫描会在启动早期解析 src/.umi 临时文件,偶发竞态导致整屏 ERROR(编译实际成功)
icons: false,
});