fix: mark chunk as existent

This commit is contained in:
tbitw2549 2024-10-23 21:13:08 +03:00
parent c6c4f4efc8
commit 16984b7c7e

View File

@ -145,7 +145,7 @@ export default defineNuxtModule<ComponentsOptions>({
const sourceFiles = getComponents().filter(c => c.global).map(c => relative(nuxt.options.srcDir, c.filePath)) const sourceFiles = getComponents().filter(c => c.global).map(c => relative(nuxt.options.srcDir, c.filePath))
for (const chunkId in manifest) { for (const chunkId in manifest) {
const chunk = manifest[chunkId] const chunk = manifest[chunkId]!
if (chunk.isEntry) { if (chunk.isEntry) {
chunk.dynamicImports = chunk.dynamicImports =
chunk.dynamicImports?.filter(i => !sourceFiles.includes(i)) chunk.dynamicImports?.filter(i => !sourceFiles.includes(i))