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
Add build.assetInlineExclude config #2173
Comments
Can not reproduce |
Hi @CHOYSEN, thanks for looking into it! To reproduce the inlined image, I did :
Here's a repo : https://github.com/gnuletik/vite-favicon-inlined. git clone https://github.com/gnuletik/vite-favicon-inlined
cd vite-favicon-inlined
yarn install
cat dist/index.html | grep icon Thanks! |
I tried setting the <link rel="icon" type="image/png" href="favicon.png?url"> |
I can see what you mean. However, if the icon is small enough, i think caching may not make sense, which is why |
Thanks for the answer ! Yes, caching may be useless if the icon is small enough. The best way may be to support "?url" parameter inside href attribute. Thanks! |
You can also move the icon file into a public folder if it is simply introduced in index.html. |
I just hit the same issue. Chrome works fine but the safari browser will not show an inline icon. |
This is true if you don't want cache busting |
Do you know if there is any progress on this Issue? Limited by content security policy, Chrome extension content scripts have to dynamic load an external script and it must not be base64 encoded. |
a special parameter like |
Is your feature request related to a problem? Please describe.
When building for production, the following line :
get transformed in this
Inlining the favicon png does not allow browser caching. I'd rather like it to not be inlined but keep inline feature for other files.
Describe the solution you'd like
Have a way to exclude some files from being inlined.
A clear and concise description of what you want to happen.
Would all assets except inline
favicon.png
.Describe alternatives you've considered
Setting
build.assetInlineLimit: 0
disables asset inlining but I want to keep it for other files than favicon.png.The text was updated successfully, but these errors were encountered: