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

Setting Up a Svelte Project with Vite

Swipe um das Menü anzuzeigen

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.

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 3

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Abschnitt 1. Kapitel 3
some-alt