refactor(vite): use new rollup chunk.names for asset names (#30780)

This commit is contained in:
Lansi 2025-01-29 06:51:56 +09:00 committed by Daniel Roe
parent 7a1e5c818b
commit 325ed41a40
No known key found for this signature in database
GPG Key ID: CBC814C393D93268

View File

@ -86,7 +86,7 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
// https://github.com/vitejs/vite/tree/main/packages/vite/src/node/build.ts#L464-L478
assetFileNames: nuxt.options.dev
? undefined
: chunk => withoutLeadingSlash(join(nuxt.options.app.buildAssetsDir, `${sanitizeFilePath(filename(chunk.name!))}.[hash].[ext]`)),
: chunk => withoutLeadingSlash(join(nuxt.options.app.buildAssetsDir, `${sanitizeFilePath(filename(chunk.names[0]!))}.[hash].[ext]`)),
},
},
watch: {