This project is a boilerplate to quickly start a web application using Vite, VanillaJS, TypeScript, Tailwind 3, and a router for a single-page application (SPA).
Check out the live demo: Demo
Clone the repository:
git clone https://github.com/padcmoi/vite-vanillajs-ts-tailwind-spa.git
cd vite-vanillajs-ts-tailwind-spa
Install the dependencies:
pnpm install
dev
: Starts the development server.build
: Builds the application for production.Use the following commands to run the scripts:
npm run dev
npm run build
vite-vanillajs-ts-tailwind-spa/
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ ├── pages/
│ ├── router/
│ ├── styles/
│ ├── main.ts
│ └── index.html
├── .gitignore
├── package.json
├── postcss.config.js
├── tailwind.config.js
├── tsconfig.json
└── vite.config.ts
Tailwind can be configured via the tailwind.config.js
file. You can customize the styles by modifying this file. Requires some change or wait the next commit to adjust the configurations according to your specific needs.
The SPA router is configured in the src/router
folder. You can add new routes by modifying the files in this folder.
Contributions are welcome. Please submit a pull request for any improvements or corrections.
This project is licensed under the MIT License. See the LICENSE file for more details.