How to use this with vite glob improt #47
-
Hi, it would be awesome if you showed an example on coincidently, is it possible to migrate documentation to a domain? ( maybe with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Re: Glob import: Since that’s a Vite feature (not specific to IMHO @baseplate-admin this isn’t documentation issue per se; it’s kind of a hack still. The core issue right now with auto-defining all your components this way is that you’re still importing every single component on every single page (even if it is clode-split), unless you break up your entry points to make sense with whatever page you’re on. So there’s still lots of manual effort. So I think what we really need is this: #32 For now though, if anyone stumbles upon this looking for a way to auto-define their components (and are cool with figuring out and are aware of the caveats noted above (please read through the tradeoffs listed in #32) then please see point 4 at #33 (comment) and notably the example code https://github.com/patricknelson/svelte-retag/blob/main/demo/vercel/src/main.js#L39-L88 which is not complete and possibly buggy (you’ve been warned). So: Probably best to keep the official/outward documentation for Re: Documentation: Maybe, that’ll take time. One person effort right now and I’m focused on core features necessary to help me build out my own project at the moment. Somebody has to work to build and maintain it and I don’t have time right now. |
Beta Was this translation helpful? Give feedback.
Re: Glob import: Since that’s a Vite feature (not specific to
svelte-retag
), you can just infer it from herehttps://vitejs.dev/guide/features#glob-import. I’m on the fence about going too far documenting that up front given I also have plans to eventually support
<svelte:options …/>
parsing so that would make that maybe a bit redundant, see: #44.IMHO @baseplate-admin this isn’t documentation issue per se; it’s kind of a hack still. The core issue right now with auto-defining all your components this way is that you’re still importing every single component on every single page (even if it is clode-split), unless you break up your entry points to make sense with whatever page you’re on. …