fix(web): ship fonts as files so the CSP lets them load
Vite inlined the two smallest Hanken Grotesk and JetBrains Mono subsets as data: URLs. The sidecar and Tauri CSPs allow fonts from 'self' only, so the browser blocked them and those character ranges fell back to a system font. Fonts are now never inlined.
This commit is contained in:
@@ -30,6 +30,9 @@ export default defineConfig(({ mode }) => ({
|
||||
},
|
||||
plugins: [react(), mode === "development" && componentTagger()].filter(Boolean),
|
||||
build: {
|
||||
// Fonts stay separate files: the sidecar and Tauri CSPs allow fonts from
|
||||
// 'self' only, so a small subset inlined as a data: URL would be blocked.
|
||||
assetsInlineLimit: (filePath: string) => (/\.(?:woff2?|ttf|otf)$/.test(filePath) ? false : undefined),
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// Split the heaviest independent vendor libraries out of the single
|
||||
|
||||
Reference in New Issue
Block a user