perf: initial vite impl

This commit is contained in:
Michael Brevard 2024-10-23 20:39:54 +03:00 committed by GitHub
parent 9bb37f68cd
commit e155e0483e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -201,7 +201,8 @@ export const bundle: NuxtBuilder['bundle'] = async (nuxt) => {
// Remove CSS entries for files that will have inlined styles // Remove CSS entries for files that will have inlined styles
ctx.nuxt.hook('build:manifest', (manifest) => { 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 const shouldRemoveCSS = chunksWithInlinedCSS.has(key) && !entry.isEntry
if (entry.isEntry && chunksWithInlinedCSS.has(key)) { if (entry.isEntry && chunksWithInlinedCSS.has(key)) {
// @ts-expect-error internal key // @ts-expect-error internal key