sveltejs/vite-plugin-svelte

Prebundling does not work with `flowbite-svelte`

benmccann opened this issue · 1 comments

Describe the bug

The example on the Flowbite Svelte getting started page results in 236 requests being made.

Enabling the prebundleSvelteLibraries there results in breakage when rendering:

Uncaught SyntaxError: ambiguous indirect export: default [AccordionItem.svelte:35:7](http://127.0.0.1:5173/node_modules/.pnpm/flowbite-svelte@0.27.4/node_modules/flowbite-svelte/accordions/AccordionItem.svelte?v=90fca3b2)

And the specific line that it references:

import classNames from '/node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js?v=363d9cb2';

If I remove the experimental pre-bundle config the app renders fine.

Using a deep import drops the number of requests down to a more reasonable 25.

Originally posted by @blitzd in #421 (comment)

Reproduction

https://flowbite-svelte.com/pages/getting-started

Logs

No response

System Info

?

Severity

annoyance

@blitzd I cannot reproduce this issue. I followed the flowbite-svelte getting started guide and enabled prebundling and do not see any errors. I pushed my code to this repository: https://github.com/benmccann/flowbite-svelte-reproduction

Please provide a reproduction if you are still hitting this issue