-
-
Notifications
You must be signed in to change notification settings - Fork 182
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Related plugins
Describe the bug
I'm trying to configure the svg favicon of an application, and that's where I realized that vitejs converts files less than the set assetsInlineLimit bytes to URI data in base64, I ran into 2 situations:
- With Static Asset Handling activated, the encoding of the .svg file to data URI is transformed from 'image/svg+xml' to 'image/png', replacing 'png' with 'svg+xml' manually everything worked fine.
Unable to find a solution or explanation to this, try disabling Static Asset Handling with assetsInlineLimit set to 0 as the documentation dictates (https://vitejs.dev/config/build-options#build-assetsinlinelimit)
- The build was still encoding the import, no matter what value you set assetsInlineLimit to.
Reproduction
https://stackblitz.com/edit/nuxt-starter-myrddp?file=app.vue
Steps to reproduce
No response
System Info
System:
OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (4) x64 Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
Memory: 7.71 GB / 15.35 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
npm: 10.7.0 - ~/.nvm/versions/node/v20.14.0/bin/npm
Browsers:
Chrome: 125.0.6422.141
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.