Skip to content

fix: adjusted font bundling which now skips vite bundling#1172

Open
Arnold Stoba (arnoldstoba) wants to merge 2 commits into
mainfrom
feat/fix-font-bundling-size-issue
Open

fix: adjusted font bundling which now skips vite bundling#1172
Arnold Stoba (arnoldstoba) wants to merge 2 commits into
mainfrom
feat/fix-font-bundling-size-issue

Conversation

@arnoldstoba

Copy link
Copy Markdown
Contributor

What?

Adjusted font loading by skipping vite bundling for fonts

Why?

Vite library mode will always inline all assets which leads to it bundling the fonts into base64, which increases the bundle size unnecessarily. With this change we are loading the actual font files instead and relying purely on css. We are required to add a small call in the build step to copy the font assets into the dist folder manually to avoid vite to handle and inline those.

How?

Custom build script copies assets, paths of fonts are set in the css - the final usage path for consumers stays the same - it's still font.css

Testing?

Tested it manually and the output dist from the build contains the correct files and paths.

… relies on manually importing woff2 font files only
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meteor-component-library Ready Ready Preview, Comment Jun 12, 2026 2:57pm

Request Review

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

Successfully merging this pull request may close these issues.

1 participant