This starter template comes with:
src/index.html
and create a main.js
file inside the src/
directory).tailwind.config.js
to create a custom design system for your project.First, download the template.
pnpx degit buhodev/vite-tailwind-starter my-tailwind-app
Then, go inside the folder and install dependencies.
cd my-tailwind-app
pnpm install
After installing your dependencies, start the development server. The --open
option opens the link in your browser automatically.
pnpm dev --open
To sort your Tailwind CSS classes & format your HTML, run:
pnpm format
When you are ready, upload the /dist
folder generated by the build
command. Do not use the preview
command in production to serve your website (it's meant to be used to preview your build on development mode only).
pnpm build
pnpm preview
This template is inspired by vite-tailwind-nojs-starter.
Font optimization best practices by Lee Robinson's Web Fonts in 2021 blog post.