Pre-requisites
Node
We have built easy-to-setup development environments thanks to vscode dev containers.
Read the NodeJS Environment Repository’s README for more information.
Svelte
Everything you need to build a Svelte project, powered by create-svelte.
Here are the main steps :
-
Creating a project
If you’re seeing this, you’ve probably already done this step. Congrats!
Terminal # create a new project in the current directorynpm create svelte@latestTerminal # create a new project in the current directoryyarn create svelte@latestTerminal # create a new project in the current directorypnpm create svelte@latest -
Developing
Once you’ve created a project and installed dependencies with
npm install(orpnpm installoryarn), start a development server:Terminal npm run devTerminal yarn run devTerminal pnpm run dev -
Building
To create a production version of your app:
Terminal npm run buildTerminal yarn run buildTerminal pnpm run buildTerminal # You can preview the production build with `npm run preview`npm run previewTerminal # You can preview the production build with `npm run preview`yarn run previewTerminal # You can preview the production build with `npm run preview`pnpm run previewTo deploy your app, you may need to install an adapter for your target environment.