Welcome to the documentation for building a Svelte project using create-svelte.
To start creating your Svelte project, follow these steps:
If you're here, you might have already completed this step. Congratulations!
# Create a new project in the current directory
npm create svelte@latest
# Create a new project in a directory named "my-app"
npm create svelte@latest my-appAfter creating your project and installing the necessary dependencies using npm install, pnpm install, or yarn, you can start the development server with:
npm run dev
# Alternatively, start the server and open the app in a new browser tab
npm run dev -- --openTo generate a production-ready build of your app, run:
npm run buildYou can preview the production build using:
npm run previewNote: To deploy your app, you might need to install an appropriate adapter for your deployment environment.
For projects using Cloudflare, the build directory will be located in .svelte-kit/cloudflare.
Happy coding with Svelte!