Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
CLXGGG opened this issue Dec 20, 2023 · 7 comments
Open

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

CLXGGG opened this issue Dec 20, 2023 · 7 comments
Labels
bug Something isn't working PR Welcome

Comments

@CLXGGG
Copy link

CLXGGG commented Dec 20, 2023

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也提了这个问题:ant-design/ant-design#46544

@PeachScript
Copy link
Member

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

@zhouzyc
Copy link
Contributor

zhouzyc commented May 10, 2024

插个眼

@zhouzyc
Copy link
Contributor

zhouzyc commented May 10, 2024

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

@PeachScript
Copy link
Member

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

@PeachScript
Copy link
Member

问题应该出在这里:

lodash.escapeRegExp(lastSlash(cwd))

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

Copy link

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,提前感谢和期待您的贡献。

@sun0717
Copy link

sun0717 commented Sep 5, 2024

m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR Welcome
Projects
None yet
Development

No branches or pull requests

4 participants