Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Setting Up a Svelte Project with Vite | Getting Started with Svelte
Introduction to Svelte

Setting Up a Svelte Project with Vite

Veeg om het menu te tonen

Before building Svelte components, you need to create a real Svelte project. In this chapter, you will use Vite, a modern frontend build tool, to generate and run your first Svelte application.

What Is Vite?

Vite is a tool that helps create and run modern frontend projects. It gives you a development server, project setup, fast refresh while coding, and a production build workflow.

For this course, you do not need to understand every Vite feature yet. You only need to know that Vite helps you start and run your Svelte project quickly.

1. Creating a Svelte Project

Open your terminal and run:

npm create vite@latest my-svelte-app

Then choose:

Svelte
JavaScript

After the project is created, move into the project folder:

cd my-svelte-app

Install the project dependencies:

npm install

2. Running the Project

Start the development server:

npm run dev

Vite will show a local development URL in the terminal. Open that URL in your browser to see your first Svelte application running.

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 3

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Sectie 1. Hoofdstuk 3
some-alt