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]: config/public中的 png 资源在获取时损坏,内容被修改 #5622

Open
Gk0Wk opened this issue Apr 10, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@Gk0Wk
Copy link

Gk0Wk commented Apr 10, 2024

版本信息

System:
    OS: macOS 13.6.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
    Memory: 291.74 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Edge: 120.0.2210.133
    Safari: 17.4.1
  npmPackages:
    @modern-js/app-tools: 2.48.4 => 2.48.4
    @modern-js/eslint-config: 2.48.4 => 2.48.4
    @modern-js/runtime: 2.48.4 => 2.48.4
    @modern-js/tsconfig: 2.48.4 => 2.48.4

问题详情

创建一个Web项目(pnpm, TS, Rspack), 创建config/public路径,在其中添加一张 png 图片,这里用 ModernJS 的 logo 为例:
image
pnpm run dev 启动服务,通过 http://localhost:8080/1.png 尝试获取图片,但是损坏
image
尝试直接下载,发现二者的大小不同
image

复现链接

https://github.com/Gk0Wk/modernjs-publicpng-bug-demo

复现步骤

见问题详情

@Gk0Wk Gk0Wk added the bug Something isn't working label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant