3 ms·
- Yes: https://github.com/sveltejs/svelte-loader https://github.com/sveltejs/svelte-loader - Unsure - Preact is essentially a lightweight implementation of Re
by 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