svelte-vite-template Svelte Themes

Svelte Vite Template

A project template for Svelte + vite 2 with optional typescript support.

svelte app

This is a project template for Svelte + vite 2 with optional typescript support.

To create a new project based on this template using degit:

npx degit anyass3/svelte-vite-template#main svelte-app
cd svelte-app

Get started

Install the dependencies...

cd svelte-app
npm install
npm run dev

Navigate to localhost:3000. You should see your app running.

Building and running in production mode

To create an optimised version of the app:

npm run build

You can run the newly built app with npm run serve.

Using TypeScript

This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with:

node scripts/setupTypeScript.js

Or remove the script via:

rm scripts/setupTypeScript.js

NOTE: this the edited official sveltejs/template/scripts/setupTypeScript.js in order match vite.

using @svitejs/vite-plugin-svelte

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes