From e155e0483ea30188c4a96190bc1a7c612d3ce418 Mon Sep 17 00:00:00 2001 From: Michael Brevard Date: Wed, 23 Oct 2024 20:39:54 +0300 Subject: [PATCH] perf: initial vite impl --- packages/vite/src/vite.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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