Sapper Tutorial

作者:刘专,日期:2019 年 12 月 08 日

What is Sapper?

Sapper is a framework for building extremely high-performance web apps. There are two basic concepts:

  1. Each page of your app is a svelte component.
  2. You create pages by adding files to the src/routes directory of your project. These will be server-rendered so that a user’s first visit to your app is as fast as possible, then a client-side app takes over.

In war, the soldiers who build bridges, repair roads, clear minefields and conduct demolitions — all under combat conditions — are known as sappers.

Why Sapper?


How to use Sapper?

The easiest way to start building a Sapper app is as following:

$ npx degit "sveltejs/sapper-template#rollup" my-app
$ cd my-app
$ npm install
$ npm run dev


  1. Sapper - The next small thing in web development
  2. Sapper: Towards the ideal web app framework, by Rich Harris, 2017/12/31