You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fresh Vite starter project configured with React, TypeScript, and Tailwind CSS v4 (using @tailwindcss/vite) experiences an extremely long cold start time of over 40 seconds for the development server (vite). This occurs in what is essentially an empty starter project.
To Reproduce
Steps to reproduce the behavior:
Create a new Vite project: pnpm create vite@latest my-app -- --template react-ts
cd my-app
Install Tailwind CSS and related dependencies: pnpm add -D tailwindcss @tailwindcss/vite
Update vite.config.ts to include the Tailwind CSS plugin:
import{defineConfig}from'vite'importreactfrom'@vitejs/plugin-react-swc'importtailwindcssfrom'@tailwindcss/vite'// Import the plugin// https://vite.dev/config/exportdefaultdefineConfig({plugins: [react(),tailwindcss()],// Add the plugin})
Update src/index.css to include the Tailwind directive:
/** @type {import('tailwindcss').Config} */module.exports={content: ['./index.html',// For your root index.html'./src/**/*.{js,ts,jsx,tsx}',],theme: {extend: {},},plugins: [],};
Additional context The project is running inside a dev container. The issue is specifically with the cold start; subsequent hot module reloads (HMR) are instantaneous.
The text was updated successfully, but these errors were encountered:
A fresh Vite starter project configured with React, TypeScript, and Tailwind CSS v4 (using
@tailwindcss/vite
) experiences an extremely long cold start time of over 40 seconds for the development server (vite
). This occurs in what is essentially an empty starter project.To Reproduce
Steps to reproduce the behavior:
pnpm create vite@latest my-app -- --template react-ts
cd my-app
pnpm add -D tailwindcss @tailwindcss/vite
npx tailwindcss init
(this createstailwind.config.js
)tailwind.config.js
:src/index.css
to include the Tailwind directive:pnpm run dev --profile (or vite --profile)
vite-profile-0.cpuprofile
Expected behavior The Vite development server should start within a few seconds for a minimal starter project.
Actual behavior The cold start takes 40+ seconds.
Environment:
OS: Linux (Debian GNU/Linux 12 bookworm in a dev container)
Node.js version: v22.15.0
pnpm version: 10.10.0
Vite version: 6.3.5
@tailwindcss/vite version: 4.1.5
tailwindcss version: 4.1.5
@vitejs/plugin-react-swc version: 3.9.0
Relevant Configuration Files:
package.json
vite.config.ts:
tailwind.config.js
Additional context The project is running inside a dev container. The issue is specifically with the cold start; subsequent hot module reloads (HMR) are instantaneous.
The text was updated successfully, but these errors were encountered: