My template of Vite + React + Tailwind
- require: npm
# install and build
npm ci
npm run build
# on vite server
npm run vite-preview
# on static server
npm run static-preview
You can check here (http://localhost:8000/) after building server.
- require: volta
volta install node@latest
volta install npm@latest
# execute bellow command at project dir.
npm create vite@latest . -- --template react
- .eslintrc.cjs (remove file)
- package.json (remove a few row)
npm install
ref: https://tailwindcss.com/docs/guides/vite
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
- src/index.css (replace to the Tailwind directives)
- tailwind.config.js (add contents)
- src/App.jsx (replace to check tailwind installation)
- src/asserts (remove dir)
- src/App.css (remove file)
- vite.config.js (define outDir of build)
npm install http-server
- package.json (edit a few row)