🎨 refactor: Prevent Font Asset Hashing in Vite Config (#3865)

This commit is contained in:
Danny Avila 2024-08-30 13:56:49 -04:00 committed by GitHub
parent 0a359aa705
commit 6936d0059f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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