#13287·umi

[Bug] 静态资源的输出文件路径被硬编码且无法用配置修改

Author: xusd320Created Apr 11, 2026Updated Apr 11, 2026

What happens?

静态资源的输出文件路径被硬编码且无法用配置修改 https://github.com/umijs/umi/blob/abd1355fc151b8aac75565953ef62929358b11a1/packages/bundler-webpack/src/config/config.ts#L88

Mini Showcase Repository(REQUIRED)

https://github.com/umijs/umi/compare/bug/report-dist-static?expand=1

bash
cd examlples/with-antd
npm run build
ls -al dist
ls -al dist/static

静态资源出处路径硬编码为 dist/static, 这导致蚂蚁内网基于 render 部署的应用,静态资源加载失败,render 要求所有产物是在 dist 下是铺平的

Image

How To Reproduce

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

Context

  • Umi Version:
  • Node Version:
  • Platform: