"Front-end development can be easier! Learn how Svelte and SveteKit combine to make it easy and intuitive to build a blazing-fast, SEO-optimized web app." | Shalini Chauhan

Shared on SvelteDevs

editor-img
Shalini Chauhan
Nov 29, 2022
shared in
"Front-end development can be easier! Learn how Svelte and SveteKit combine to make it easy and intuitive to build a blazing-fast, SEO-optimized web app."

Today we will take a beginner-friendly look at What Is SvelteKit and Why Do We Need SvelteKit?

While Svelte alone gives you a very good development experience, you still have to decide on how you want to ship your application to the user. The classical approach would be to take your favourite module bundler like Rollup and bundle your code into one big, fat JavaScript file. Then, you can call it from a very basic HTML document, like so:

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8" />

...

</head>

<body>

<div id="app" />

<script src="dist/bundle.js"></script>

</body>

</html>

While this is absolutely legit, the user’s experience might not be ideal.

First of all, instead of serving an almost empty HTML file to the client, SvelteKit already comes with all the HTML elements you need for the first page view. The benefits are faster page loads and SEO boosts. There are two ways SvelteKit does this: prerendering and server-side rendering. I’ll explain both in more detail below till then stay tuned:)


Tagged users
editor-img
Aryan Agarwal
@aryankush25
Technical Lead | Driving Innovation at Glue Labs | Ex - Software Development Engineer at GeekyAnts Just Learning New Things!! 😉