-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Vite doesn't inline SVG assets #1197
Copy link
Copy link
Closed
Description
vite/src/node/build/buildPluginAsset.ts
Lines 60 to 63 in 480367b
| if (!id.endsWith(`.svg`) && content.length < Number(inlineLimit)) { | |
| url = `data:${mime.lookup(id)};base64,${content.toString('base64')}` | |
| content = undefined | |
| } |
Hi. I noticed that
svg files is explicitly excluded in the assetsInlineLimit feature, and I'm wondering why that is so. Renaming the extension to .SVG (thus bypassing the .endsWith check) works fine in my project.
This limit exists since the first time the feature was added, and I'm unable to find any kind of comments or documentation about it. Could someone shed some light on this please? Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels