dumi icon indicating copy to clipboard operation
dumi copied to clipboard

bug: 在windows系统下,打包后文件名带":"导致命名失败

Open CLXGGG opened this issue 2 years ago • 7 comments

Version

2.3.0-alpha.9

OS Version

windows 10

Node.js Version

21.3.0

Browser Version

120.0.2210.77

Link to minimal reproduction

https://github.com/CLXGGG/antd-web/blob/main/meta__E

Steps to reproduce

克隆antd文档项目:git clone https://github.com/ant-design/ant-design.git 安装依赖:yarn 打包:yarn site site打包后有的文件名命名成了“E:”这种格式,windows系统下冒号":"是不能用来当文件名的,导致命名失败。重现链接是我site打包后的项目,命名失败文件名变成了“meta__E”。运行项目时会访问文件“meta__E:__zh-CN.02244dde.async.js",报错了。

What is expected?

打包不应该有“E:”这种格式的文件命名

What is actually happening?

文件命名失败,找不到文件

Any additional comments? (optional)

我在antd也提了这个问题:https://github.com/ant-design/ant-design/issues/46544

CLXGGG avatar Dec 20 '23 08:12 CLXGGG

@MadCcc 看看?应该和 meat chunkName 的生成没处理 winPath 有关系

PeachScript avatar Dec 20 '23 09:12 PeachScript

插个眼

zhouzyc avatar May 10 '24 07:05 zhouzyc

image image image win打包的,在本地 dumi preview 正常,打包文件放到服务器centos7.5 nginx 上就不行了

zhouzyc avatar May 10 '24 07:05 zhouzyc

@Jinbao1001 下个 patch 需要修复下这个

PeachScript avatar May 13 '24 01:05 PeachScript

问题应该出在这里:https://github.com/umijs/dumi/blob/f2a0b9e0e44ecb137a2a98cb6330c7c76cbd68fc/src/utils.ts#L190

@zhouzyc 有精力的话可以帮忙排查提交修复 PR 🙏

PeachScript avatar May 13 '24 06:05 PeachScript

Hello @CLXGGG. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please be sure to fill in the default template in the Pull Request, provide changelog/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!

你好 @CLXGGG,我们完全同意你的提议/反馈,欢迎直接在此仓库创建一个 Pull Request 来解决这个问题。请务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。

github-actions[bot] avatar May 13 '24 06:05 github-actions[bot]