From 38d08540b22121d15564c5f7ee76cfa7a12b613f Mon Sep 17 00:00:00 2001 From: julien huang Date: Tue, 29 Aug 2023 22:16:53 +0200 Subject: [PATCH] fix: preserveEntrySignatures --- packages/nuxt/src/components/islandsTransform.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nuxt/src/components/islandsTransform.ts b/packages/nuxt/src/components/islandsTransform.ts index fc4c742dbc..96cbd8fe84 100644 --- a/packages/nuxt/src/components/islandsTransform.ts +++ b/packages/nuxt/src/components/islandsTransform.ts @@ -152,7 +152,7 @@ export const componentsChunkPlugin = createUnplugin((options: ComponentChunkOpti config.build.rollupOptions = config.build.rollupOptions || {} config.build.rollupOptions.output = config.build.rollupOptions.output || {} config.build.rollupOptions.input = config.build.rollupOptions.input || {} - + config.build.rollupOptions.preserveEntrySignatures = 'strict' for (const component of components) { if (component.mode === 'client' || component.mode === 'all') { // (config.build.lib.entry as Record)[component.pascalName] = await resolvePath(component.filePath) @@ -181,7 +181,7 @@ export const componentsChunkPlugin = createUnplugin((options: ComponentChunkOpti if (chunkInfo.type !== 'chunk') { continue } for (const component of components) { - if (chunkInfo.facadeModuleId) { + if (chunkInfo.facadeModuleId && chunkInfo.exports.length > 0) { const { pathname } = parseURL(decodeURIComponent(pathToFileURL(chunkInfo.facadeModuleId).href)) const isPath = await resolvePath(component.filePath) === pathname if (isPath) {