atlowChemi / vite-svg-2-webfont

A vite plugin which generates a webfont out of svg icons
https://www.npmjs.com/package/vite-svg-2-webfont
MIT License
24 stars 8 forks source link

Does someone know how to output it without a hash? #19

Closed yustinTR closed 3 months ago

yustinTR commented 4 months ago

it outputs them like this : dist/assets/test-oBK5LLTu.woff2

atlowChemi commented 4 months ago

That is due to the guid() called here: https://github.com/atlowChemi/vite-svg-2-webfont/blob/b14d485ae33afb051620034699119de27b94c67e/src/index.ts#L104

Why do you need to remove the hash? what is the use case?

Azarattum commented 4 months ago

@atlowChemi for example, I would want to add <link rel="preload" for my font. And I cannot do that unless I know the path in advance. Also I would really like an option to inline font assets as base64 (that would totally solve the preload issue for me).

atlowChemi commented 4 months ago

@Azarattum thank you for your contribution! 🙂

@yustinTR Does the change added @Azarattum work for your needs? Still not clear to me what the issue is 🙂

atlowChemi commented 3 months ago

I'll be closing this as some time has passed, feel free to re-open if needed 🙂