dominikg / svite

svelte integration for vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reevaluate svite in context of svelte announcement

dominikg opened this issue · comments

Please note that with the latest announcement ( https://www.youtube.com/watch?v=qSfdtmcZ4d0 ) there are a few things i have to figure out for svite and its future.

I'll be updating this post as i go, expect svite 0.8.0 to be the latest release for a while.

Lets put some obvious things here

  1. unclear upstream situation
    activity in vite has dropped significantly - if or when it becomes more active again, focus is likely going to be on vue3 and not generalization for other frameworks

  2. major svite features will be available in svelte kit

  • cli with create, dev, build
  • ultra fast hmr with snowpack
  1. interest in svite has been underwhelming after sveltesummit

Questions that arise

A) is forking vite an option? Drop all vue and react stuff, put in svelte as first class citizen. (would significantly reduce work for css only hmr for example)

B) What are future plans for vite?

C) Is there still room for svite in the svelte ecosystem. Which features would be helpful that are not provided by svelte-kit?

D) Is the result of the above enough to generate more interest

E) What are the alternatives if the above does not lead to a result where svite development continues

commented

Any links to this svelte kit?

You can test it with npm init svelte@next in an empty directory, the source code is not public and it's not finished so don't expect anything to work or be in its final form.

Updates

unclear upstream situation
activity in vite has dropped significantly - if or when it becomes more active again, focus is likely going to be on vue3 and not generalization for other frameworks

Evan You started doing releases and merges again, including outstanding issues that hindered svite. 🎆 Still needs to be seen where focus is going to be

A) is forking vite an option? Drop all vue and react stuff, put in svelte as first class citizen. (would significantly reduce work for css only hmr for example)

a soft tracking fork would be too much work while vite is under heavy development, a hard fork before a stable vite 1.0 would also create a lot of fixing/maintaining overhead => no, forking is not an option right now

C) Is there still room for svite in the svelte ecosystem. Which features would be helpful that are not provided by svelte-kit?

  • routify
  • ootb features of vite (postcss support, opinionated build)
  • other plugins from vite ecosystem?

E) What are the alternatives if the above does not lead to a result where svite development continues

  • Add documentation on how to migrate svite applications to svelte-kit. Might be tough for routify users though...

That would be a shame as I like svite very much

As you mentioned also, it doesn’t look like SvelteKit will support routify/SPAs. That would be a major use case for svite for folks who need SPAs. Would it make sense to focus on svite + routify as the “svelte kit” for SPAs?

Also, some recent updates on vite: vitejs/vite#1207

Yes, routify and pure clientside/prerendered SPA is an area where svite can still shine, altough it remains to be seen how much of that ground will be covered by svelte-kit aswell.

The Ideas behind vite 2.0 align with some of my thoughts and seem like great and natural evolution from the transform api that already seemed inspired by rollup. If it turns out the way i think, most of svites internal hacks and workarounds will no longer be needed. 🥳

Considering the roadmap includes "Move Vue specific logic into its own dedicated plugin (this also gets rid of all Vue-specific config options)", it might really pay off to be patient. Snowpack is great but I think end-of-2020 is too soon to declare a "winner".

Just a quick update. vite 2 is in beta now and it looks very promising.
I'm curious about how it works and so i'm intending to rebuild svite on top of vite2.

Some things to keep in mind:

  1. this is an intention, not promising results
  2. this is not an attempt to compete with svelte-kit or in any way negative towards it. I'm looking forward to it.
  3. my spare time is limited, again no promises.

Sounds like sweet music to my ears 😍

It is planned for SvelteKit to have support for SPA-mode / ability to toggle on-and-off client-side rendering or SSR

A couple things I wonder about - what's missing in svite in terms of SSR support? Are all preprocessors supported? Why does TypeScript need a special flag / special support?

working ssr support does not exist in svite, thanks for updating the docs on that.

preprocessors are supported via regular svelte config / rollup-plugin-svelte.

ts flag is currently only a safeguard to ensure a ts preprocessor exists, peviously it supplied a ts preprocessor automatically.

@dominikg I just saw SvelteKit just switched to Vite in the latest release 1.0.0-next.35 and uses a new @sveltejs/vite-plugin-svelte package.

I'm aware, thx

@dominikg I was curious if you had a hand in it... :)

svite 0.9 beta has started, see https://github.com/dominikg/svite#svite-08-is-discontinued-this-repository-is-not-going-to-receive-updates

@svitejs/vite-plugin-svelte is currently used by sveltekit and it is going to be moved into the svelte org. Once that process is done, svite and kit will both be using the same @sveltejs/vite-plugin-svelte.This is mostly a logistics issue at this point and implementation work on vite-plugin-svelte itself should be largely unaffected by its name and repository location.

time will tell if svite has enough to offer to stand on its own besides kit, but i'm sure some are going to like its simplicity (the minimal template is still very minimal), and work on the new windicss template and automatic vite preprocessors could prove to be a nice thing aswell. 🥳

Awesome work, thank you! As someone who works with PHP + Svelte, I appreciate your efforts on Svite.

commented

well done mate to get official!

Just curious. What will Svite provide over Vite 2.0? With 2.0 it's really easy to get a Svelte project going now that there is official support for Rollup plugins and other things like PostCSS and SASS work out of the box. What's Svite's master plan @dominikg?

I'm not sure what the future holds for svite itself. The least it can continue to offer are starters/templates.

sveltekit uses vite under the hood, but there will be usecases for svelte and vite2 that kit does not cover well. This is where svite can offer benefits/solutions/alternatives. But unlike svite 0.8 which wrapped around vite out of neccessity to make things work, it will be purely focussed on extra functionality and ease of use. Also the new monorepo has a playground where i can experiment a lot, and maybe one or two of those experiments will show up somewhere some day ;)