From ee279635baeaad1cc9298d8c4cdc7cbb0d6cd4bf Mon Sep 17 00:00:00 2001 From: julien huang Date: Tue, 29 Aug 2023 21:08:03 +0200 Subject: [PATCH] fix: remove lib config --- packages/nuxt/src/components/islandsTransform.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/nuxt/src/components/islandsTransform.ts b/packages/nuxt/src/components/islandsTransform.ts index d0448af43e..fc4c742dbc 100644 --- a/packages/nuxt/src/components/islandsTransform.ts +++ b/packages/nuxt/src/components/islandsTransform.ts @@ -152,12 +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.lib = { - entry: {}, - formats: ['es'], - fileName: '[name].mjs', - name: 'components' - } + for (const component of components) { if (component.mode === 'client' || component.mode === 'all') { // (config.build.lib.entry as Record)[component.pascalName] = await resolvePath(component.filePath) @@ -188,7 +183,6 @@ export const componentsChunkPlugin = createUnplugin((options: ComponentChunkOpti for (const component of components) { if (chunkInfo.facadeModuleId) { const { pathname } = parseURL(decodeURIComponent(pathToFileURL(chunkInfo.facadeModuleId).href)) - const isPath = await resolvePath(component.filePath) === pathname if (isPath) { chunkInfo.isEntry = false