-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve @svelteuidev/core
to prebundled version
#421
Comments
If I turn on the
I'm not sure what the desired code path is supposed to be though or where it might be going wrong. If I simply remove that line it seems to resolve to the correct location |
Note that using a deep import Edit:using deep imports for multiple components of svelteuidev creates a separate bundle in .vite for every component. |
@benmccann @dominikg Worth noting that the actual library we were running into with this was SMUI, and it also has a warning message about not being able to resolve sourcemaps for any of the underlying |
This issue also impacts Flowbite Svelte. The example on their getting started page results in 236 requests being made. Enabling the
And the specific line that it references:
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. |
If we made the Rich mentioned this idea along with some of the history behind the field on Discord and I preserved it in a GitHub comment here: sveltejs/kit#1959 (comment) |
fixed in vite-plugin-svelte 1.2.0 with |
Describe the bug
Bug report from Discord: https://discord.com/channels/804011606160703521/1012085571985866914/1012390467331166238
@bluwy stated:
hmm yeah there seems to be an issue with Vite's resolver. It should resolve importing @svelteuidev/core to the one in .vite/deps
Reproduction
npm create vite@latest myapp -- --template svelte-ts
... run
npm run dev
and it's 21 reqs.npm i -D @svelteuidev/core
... edit
Counter.svelte
:... add
prebundleSvelteLibraries: true
, runnpm run dev
and it's now 369 reqs and a 4s load time.@smui or @svelteuidev libraries do show up in node_modules/vite/.deps - but no change in actual behaviour of the requests or bundling that I can see. There is also a message that appears with SMUI stating that it cannot find source for a bunch of @Material deps from SMUI, so that is why I was testing with @svelteuidev as well as it does not have those material deps, but - same issue there
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: