In my project (see link below), the official integration @astrojs/tailwind generates two css files:
-
File A
18.1KB.
It contains all the utility classes I use in my project.
This is expected! -
File B
40.1KB.
It contains exactly the same content as File A, but withfont-faces, because I use Inter.
And the@font-facepart is super bloated, because it serves font as base64:src: url(data:font/woff2;base64,[LONG LONG LONG BASE64])
When I run tailwind -o build.css --minify manually, I only got file A (18.1KB).
Is this an expected behavior? If not:
- Why Astro generates two identical css files rather than one, as
--minifydoes? - Why is the font served as base64?
My source code: https://github.com/mrcaidev/portfolio
Deployed on Vercel: https://mrcai.dev (Check DevTool Network tab, and see 404.[hash].css(18.1KB) and about.[hash].css(40.1KB))
I'm particularly concerned about the performance of my website, so this is very important to me. Thank you🙏