Bjorn Lu
Bjorn Lu
I haven't got any negative feedback so I hope all's good with `prebundleSvelteLibraries` 😄 I'll try to get this stabilized once Vite 3 lands. There's a lot of moving parts...
I think another way is to add it to `app.html`, but IIRC SvelteKit doesn't process it, and links to styles or scripts are static. Perhaps SvelteKit should have some way...
I think this should be supported via https://github.com/vitejs/vite/issues/7385 first so we don't mix Vite's aliases with Node's aliases.
Re 100+ requests, looks like `prebundleSvelteLibraries` only took effect on `@rgossiaux/svelte-heroicons` but not `@rgossiaux/svelte-headlessui`, otherwise it should've been lesser requests made. It seems to be like a resolve bug in...
Another report on [discord](https://discord.com/channels/804011606160703521/1012085571985866914/1012393253137547324) showed that `@svelteuidev/core` has a similar issue, where we did prebundle the svelte library, but Vite doesn't resolve to the prebundled file.
`svelte-hero-icons` need to export `pkg.svelte` to provide a hint for `vite-plugin-svelte` to handle Svelte libraries in SSR. `vite-plugin-svelte` would essentially add `svelte-hero-icons` to `ssr.noExternal`, so as a workaround for now...
Ah looks like that's it. I didn't notice the `pkg.svelte` was added before publishing. This would be a bug in `vite-plugin-svelte` then, moving it over.
Note: This is also discussed in a [discord thread](https://discord.com/channels/457912077277855764/873567489139814431/873567490725277756).
Yes it will revert the errors. Following https://github.com/vitest-dev/vitest/pull/1411#issuecomment-1147530146, if they're using the new `nodenext` or `node16` options, they must name the test files with `.mts` if `"type": "module"` is not...
I think that makes sense 👍