Skip to content
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

Don’t inline fonts/images manually #7

Open
ai opened this issue Aug 16, 2023 · 0 comments
Open

Don’t inline fonts/images manually #7

ai opened this issue Aug 16, 2023 · 0 comments

Comments

@ai
Copy link
Member

ai commented Aug 16, 2023

Right now we manually put font in data:uri format https://github.com/mikhin/vite-figma/blob/main/src/ui/style.css#L15

But it is not really maintainable. You can’t open font/image file in system viewer. You can’t replace font just by replacing the file.

Vite can’t inline font by it own. We should keep fonts/images as a regular files and inline them by built tools.

Also, inline is a little bad practice. Font files are big. And base64 decoding and CSS parser is not free. Maybe we should move to separated file and preload tag in HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant