4 ms·
Looks to have connectivity with gulp, browserify, webpack, system.js, a lot of stuff. That's rad! I wish it had easier samples to show what the code you write l
by jc4p 10y ago
Looks to have connectivity with gulp, browserify, webpack, system.js, a lot of stuff. That's rad! I wish it had easier samples to show what the code you write looks like.
I have a couple questions just off the homepage that I didn't quite really get answered:
- Can I use webpack? Can I add this into my current webpack flow?
- Can I use TypeScript?
- How does this compare to preact? Note that their homepage has a lot more info than this one: https://preactjs.com/ https://preactjs.com/
- jacobmischka 10y ago- Yes: https://github.com/sveltejs/svelte-loader https://github.com/sveltejs/svelte-loader - Unsure - Preact is essentially a lightweight implementation of React. As such, it requires a runtime, albeit an incredibly small one, to dynamically render HTML from JSX (Edit: Well, compiled JSX. Essentially hyperscript function calls.). Svelte components compile at buildtime to pure es5, so you can just run it directly on the client without a runtime. There are benefits and drawbacks to each method, but that's the gist of their main differences.
- jc4p 10y agoSorry if I'm just not getting it. is it compiling some nice language I write into some JS that runs compile time? Or is this a static website generator? If I use Svelte to make my site, is the expectation that the data is being loaded in the cacheable HTTP call or is it a SPA?
- allover 10y agoCheck the REPL and compare the input to the output: https://svelte.technology/repl https://svelte.technology/repl
- jaeh 10y agoyou can have a look at https://github.com/jaeh/meds https://github.com/jaeh/meds to see an example, online at https://jaeh.github.io/meds https://jaeh.github.io/meds basically an offline first app that i developed both because i needed it and because i wanted to have a look at svelte.
- rich_harris 10y ago> I wish it had easier samples to show what the code you write looks like If you visit the REPL you can click on the 'output' button to see some sample output code: https://svelte.technology/repl https://svelte.technology/repl > Can I use webpack? Yep, there's a webpack loader: https://github.com/sveltejs/svelte-loader https://github.com/sveltejs/svelte-loader > Can I use TypeScript? Integration with things like TypeScript is on the nice-to-have list — we have an issue here: https://github.com/sveltejs/svelte/issues/58 https://github.com/sveltejs/svelte/issues/58 > How does this compare to preact? Last time I checked, Svelte was faster. Need to get some automated benchmarks up and running, and compare sizes (and parse & startup time) for equivalent non-trivial apps.