I got an initial version of a starter up and running with Svelte and Svelte-Routing. Svelte Routing requires Meteor 1.8.2, due to the way it ships source. It exports .svelte files directly, which need to be recompiled, and that requires 1.8.2 (still in beta).
I tried to get SSR working, but it wasn’t picking up the server rendered HTML, and instead was rending a second copy of the tree. I also don’t think I have linting set up correctly - VS Code is all over the place.
The next thing to get up and running is svelte-loadable (I’ll have to port the SSR stuff from 'npdev:react-loadable). After that maybe I'll port over npdev:collections`.
I was reading through your documentation for the svetle-loadable package. that is awesome work, i am working on adding that in to the small proof of concept i have been building. I started with this repo
and I am working towards yours
So I have routing now, next is code splitting, and then i will add rehydration.
It was easier for me to work from a simpler example at first and then add in what you had in your repo to start with. But your starter repo is awesome. It is great place to start from once you understand how it works. thanks for building that
I would advise against that. In my opinion there is only one case where it makes sense to mix different view layers like this and incur the increase in complexity and technical debt associated with it - where you have a very large app that you simply cannot migrate in one go from the old to the new. And even then I would view it just as a temporary measure to ease the migration.
For a svelte tutorial you could just use the underlying accounts methods and bypass the accounts-ui package altogether.
my idea was to keep the step by step guides consistent across all of them vue, react, blaze angular and hopefully someday svelte.
To dig that deep in the todos list step by step guide may be what i end up doing, but i wanted to keep those guides for beginners. and then have other guides that go into the accounts system from scratch. We will see what ends up happening
I really hope the official tutorials are not advocating for mixing view platforms. Without a proper Svelte account-ui package, at least a starter repo would be preferred.
Well this is pulled from the react tutorial verbatim
“By default, new Meteor applications use Blaze as their templating engine. While it’s possible for a Meteor application to use Blaze and React simultaneously, the application we’re building in this tutorial does not need Blaze at all.”
But the only point in the step by step guide that requires making use a Blaze template is the accounts step.
So in order to make a svelte tutorial that is similar to the react guide and the vue one I made I have two options.
1.) build a login form from scratch. which isnt a huge deal but for a beginner it might seem difficult.
2.) do what i did with the vue tutorial i made and that was to take the {{> loginButtons}} template and add it to my vue component using a 3rd party package. This second approach is consistent with the other step by step guides. And the approach offered by @arggh is very close to how the react guide does it.
But after i make one you guys can take a look and see how you like it.
It would be trivial to just wrap the blaze templates in a svelte component and distribute those as a svelte package. Or even just a plain js package, since svelte outputs to plain js as well.