Skip to content

Commit

Permalink
🎨 refactor: Prevent Font Asset Hashing in Vite Config (danny-avila#3865)
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila authored Aug 30, 2024
1 parent 0a359aa commit 6936d00
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ export default defineConfig({
},
entryFileNames: 'assets/[name].[hash].js',
chunkFileNames: 'assets/[name].[hash].js',
assetFileNames: 'assets/[name].[hash].[ext]',
assetFileNames: (assetInfo) => {
if (assetInfo.name && /\.(woff|woff2|eot|ttf|otf)$/.test(assetInfo.name)) {
return 'assets/[name][extname]';
}
return 'assets/[name].[hash][extname]';
},
},
/**
* Ignore "use client" waning since we are not using SSR
Expand Down

0 comments on commit 6936d00

Please sign in to comment.