Skip to content

Commit 6936d00

Browse files
authored
🎨 refactor: Prevent Font Asset Hashing in Vite Config (danny-avila#3865)
1 parent 0a359aa commit 6936d00

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/vite.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@ export default defineConfig({
120120
},
121121
entryFileNames: 'assets/[name].[hash].js',
122122
chunkFileNames: 'assets/[name].[hash].js',
123-
assetFileNames: 'assets/[name].[hash].[ext]',
123+
assetFileNames: (assetInfo) => {
124+
if (assetInfo.name && /\.(woff|woff2|eot|ttf|otf)$/.test(assetInfo.name)) {
125+
return 'assets/[name][extname]';
126+
}
127+
return 'assets/[name].[hash][extname]';
128+
},
124129
},
125130
/**
126131
* Ignore "use client" waning since we are not using SSR

0 commit comments

Comments
 (0)