Tailwind Intellisense - WebStorm

I hope this guide will help webstorm users.

WebStorm version - 2023.1 ,
Tailwindcss - 3.3.0

The problem:
Tailwind Intellesense doesn't work at all.

Solution:
  • Change tailwind config file extension from .ts to .cjs and change code to this one:
    ```cjs
    / @type {import('tailwindcss').Config} */
    const config = {
    content: ["./src/
    /*.{js,ts,jsx,tsx}"],
    theme: {
    extend: {},
    },
    plugins: [],
    };
module.exports = config;
Don't forget to save the file. And add to tsconfig.json:
json
"exclude": ["node_modules", "tailwind.config.cjs"]
```
Was this page helpful?