Make asset caching work with vite
This commit is contained in:
parent
652781fcc8
commit
0cb47652b8
3 changed files with 57 additions and 1 deletions
|
|
@ -165,7 +165,14 @@ export default defineConfig(async ({ mode, command }) => {
|
|||
return 'static/js/[name].[hash].js'
|
||||
}
|
||||
},
|
||||
chunkFileNames () {
|
||||
chunkFileNames (chunkInfo) {
|
||||
if (chunkInfo.facadeModuleId) {
|
||||
if (chunkInfo.facadeModuleId.includes('node_modules/@kazvmoe-infra/unicode-emoji-json/annotations/')) {
|
||||
return 'static/js/emoji-annotations/[name].[hash].js'
|
||||
} else if (chunkInfo.facadeModuleId.includes('src/i18n/')) {
|
||||
return 'static/js/i18n/[name].[hash].js'
|
||||
}
|
||||
}
|
||||
return 'static/js/[name].[hash].js'
|
||||
},
|
||||
assetFileNames (assetInfo) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue