svelte SPA with TypeScript, Routes and SCSS

submited by
Style Pass
2021-07-14 22:00:08

svelte is one of the newer JavaScript-Frameworks out there. Although I do not tend to jump on the hype train, the “compile time” approach svelte uses is really promising referring to performance and size. Here is how to start a project with TypeScript, Routes and SCSS…

This tutorial is based on information I gathered during my research and project work and summarizes setting up features, I’d personally like to use. It is a basic project setup for advanced users, not for beginners and neither a replacement for the official documentation nor a guide that describes all best practises. It contains:

svelte is fast and small - ideal for smaller to medium-sized projects in my opinion. Instead of being stuffed with features at runtime, it converts the code and templates to native javascript at compile time, which results in delivering only vanilla JavaScript code, that is absolutely necessary. The support of Web-Components and a pretty fast boilerplate is a bonus.

Before you start with svelte , you have to install Node.js (node, npm, npx). You’ll find further instructions on the homepage.

Leave a Comment