sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.78k stars 1.96k forks source link

Modular SvelteKit apps #3369

Open GauBen opened 2 years ago

GauBen commented 2 years ago

Describe the problem

I would like a way to load SvelteKit sub-modules within a SvelteKit site.

A sub-module would be a usual SvelteKit site with:

Describe the proposed solution

I created a prototype to showcase the feature: GauBen/modularized-sveltekit-app

It works well enough for my current needs, but have some shortcomings:

Alternatives considered

No response

Importance

would make my life easier

Additional Information

See also:

vdvman1 commented 2 years ago

I would absolutely love to have this feature too!

I am planning on developing an app using Svelte and Tauri, and want to be able to load plugins that can have their own (sub)routes, but right now SvelteKit doesn't enable this situation.

xpluscal commented 2 years ago

Super enticing idea. Have you made any discoveries since originally posted this @GauBen?

GauBen commented 2 years ago

Hey! I stopped my investigations and went back to a single svelte-kit app, the developer experience was better. Also, layout groups do most of what I wanted: being able to group routes by feature and move them together easily.

Smilefounder commented 1 year ago

Thanks @GauBen for sharing. I'm trying to apply this modular architecture in our Vontigo SvelteKit CMS as well.