-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Vite inlines icon resources that should not be inlined #6741
Labels
Comments
We have a similar issues when bundling vite apps to electron/nwjs. there are some 3rd party integrations that expect urls/file paths and do not support inlined base64 assets. |
I think it makes sense to not inline |
@bluwy It also makes sense to inline link rel="apple-touch-icon" by default since safari throws an error when the url is base64 |
9 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
When Vite asset-ifies
<link>
resources it applies the default assetsInlineLimit for JS without considering whether it makes sense to inline the resource in HTML.One issue this causes is in site icons. If a site icon is small enough, instead of just putting it in /assets with a cache buster (which can be desirable for site icons), Vite will inline it into the document.
This is a problem since now site icons are downloaded inline with every page request which is problematic for a number of reasons:
Manifests are also inlined, but that bug was reported in #5962.
Reproduction
https://github.com/dantman/vite-excessive-inline-resources-bug
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: