Skip to content

Modular svelte apps #1251

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

Closed
jarda-svoboda opened this issue Apr 27, 2021 · 3 comments
Closed

Modular svelte apps #1251

jarda-svoboda opened this issue Apr 27, 2021 · 3 comments

Comments

@jarda-svoboda
Copy link

Is your feature request related to a problem? Please describe.
Sometimes you need to create modular apps. Basically stand-alone modules (with their own logic, stores, etc.) connectable to main module as a pieces of puzzle. Is something like that possible with SvelteKit?

Untitled Diagram

Describe alternatives you've considered
Some time ago I've tried to create something similar with Sapper https://github.com/jayk09/svelte-modular

How important is this feature to you?
Handy/Good to have

@Conduitry
Copy link
Member

No. The parent app needs to be able to see all of the routes ahead of time, and it does this by traversing through the filesystem and creating a manifest. An API would need to be created for packages to expose what lives inside them, and an API would need to be created for wiring up a package of routes/components/etc. at a given subpath. If you have concrete ideas of how those would look, you're welcome to share them, but I don't think planning this is something that any core members would be spending time on in the foreseeable future.

@benmccann
Copy link
Member

I wrote an RFC awhile back for Sapper that might provide pieces of this sveltejs/rfcs#36. I semi-updated it for SvelteKit, but it's not really something I've been pursuing anymore. Happy to talk about it if you or anyone else would like to try implementing something. But today this is not possible with the current code and is not something that anyone's prioritizing, so I'm going to go ahead and close this to keep the issue tracker clean. Feel free to keep discussing here though

@jarda-svoboda
Copy link
Author

I 100% agree and understand that this topic is not for 1.x. It needs solid concept (should be there some “route-link” files or some config overriding the file-based router? etc etc..) and probably many hours of development. This is just an idea because modular development is something I miss in Sapper and I think it could be possibly handy for bigger apps..
Awesome job with SvelteKit anyway! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants