Skip to content

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

@xusd320

Description

@xusd320

What happens?

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

opts.staticPathPrefix !== undefined ? opts.staticPathPrefix : 'static/',

Mini Showcase Repository(REQUIRED)

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

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions