sveltekit-tailwind-static-template

Sveltekit Tailwind Static Template

sveltekit-tailwind-static-template

Everything you need to start building a static site with SvelteKit and TailwindCSS. Perfect for deploying to Netlify, Cloudflare Pages, etc.

Developing

Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:

npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open

Building

To create a production version of your app:

npm run build

You can preview the production build with npm run preview.

CSR

By default, client-side rendering is disabled. This essentially turns SvelteKit into a static site generator, where all of the HTML is generated at build time and nothing changes afterwards. This does disable HMR though, so you may want to leave this on during development. If you need CSR, you can set

export const csr = true;

in src/routes/+layout.ts to enable it.

Top categories

Loading Svelte Themes