/**
* Vite settings shared by all four sites.
*
* Imported by each astro.config.mjs. Kept as plain .mjs rather than living in
* src/ because Astro loads its config before any TypeScript path resolution
* exists.
*/
/**
* Vite inlines any asset under 4 kB as a `data:` URI. That is a good default
* for small images and a silent bug for fonts here, because the site's
* Content-Security-Policy sets `font-src 'self'` — a data: URI is not 'self',
* so the browser refuses to load it and the glyphs simply never arrive.
*
* It only bites the handful of subsets that happen to be small: JetBrains
* Mono's cyrillic-ext subset is 3.6 kB, so it was inlined and blocked while
* the other seventeen font files loaded normally. Exactly the kind of failure
* that hides for a year and then shows up as tofu in someone's name.
*
* Returning `false` forces a real file; returning `undefined` leaves Vite's
* normal size-based decision in place for everything else.
*/
export const sharedVite = {
build: {
assetsInlineLimit(filePath) {
if (/\.(woff2?|ttf|otf|eot)$/i.test(filePath)) return false;
return undefined;
},
},
};