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
new URL ,The packing volume increases 打包体积增大 #16506
Comments
Start a new pull request in StackBlitz Codeflow. |
This is expected. Vite cannot analyze that |
@sapphi-red |
I guess using const modules = import.meta.glob('./assets/img/{a,b,c}.jpg', { eager: true })
function getImageUrl(name) {
return modules[`./assets/imgs/${name}`]
} |
Describe the bug
It seems to pack all the image addresses under imgs.
似乎会把imgs下的所有图片地址都打包
Reproduction
https://stackblitz.com/edit/vitejs-vite-irxn4k?file=main.js,package.json&terminal=dev
Steps to reproduce
npm run build
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: