Tailwind CSS IntelliSense doesn't work in a new Next.js project unless I add tailwind.config.ts
I created a new Next.js project, and Tailwind CSS (v4) was installed by default. However, in my editor (WebStorm), I don't get any suggestions for Tailwind classes.
For example, without a config file:
As soon as I add an empty tailwind.config.ts file in the project root, IntelliSense starts working:
Is this expected behavior? Do I always need a tailwind.config file for IntelliSense to work, or am I missing something in my setup?
Here are my devDependencies:
"devDependencies": {
"@eslint/eslintrc": "^3",
"@tailwindcss/postcss": "^4",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "15.5.0",
"tailwindcss": "^4",
"typescript": "^5"
}
@tailwindinstead of@import "tailwindcss". Similar trivial mistakes cause this, since the plugins are compatible with both v3 and v4.