diff --git a/packages/vite/src/vite.ts b/packages/vite/src/vite.ts index 5500f4bed0..80795fea59 100644 --- a/packages/vite/src/vite.ts +++ b/packages/vite/src/vite.ts @@ -201,7 +201,8 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => { // Remove CSS entries for files that will have inlined styles ctx.nuxt.hook('build:manifest', (manifest) => { - for (const [key, entry] of Object.entries(manifest)) { + for (const key in manifest) { + const entry = manifest[key] const shouldRemoveCSS = chunksWithInlinedCSS.has(key) && !entry.isEntry if (entry.isEntry && chunksWithInlinedCSS.has(key)) { // @ts-expect-error internal key