Tailwind's Intellisense VSCode extension does not appear to work in TSX files in T3 App
Hi there, I recently spun up a T3 project for the first time and noticed that Tailwind's Intellisense extension was not working in TSX files. I then noticed that the T3 boilerplate uses a ts file extension for the Tailwind config file. In the docs they state "In order for the extension to activate you must have tailwindcss installed and a Tailwind config file named tailwind.config.js or tailwind.config.cjs in your workspace." I then saw they recently released that they added support to enable ESM and TS based config files (https://github.com/tailwindlabs/tailwindcss/pull/10785) so is the reason that Tailwind's Intellisense extension is not working or do I need to additional configuration to the Tailwind extension/project?
GitHub
Enable ESM and TS based config files by RobinMalfait · Pull Request...
This PR adds support for loading and scaffolding ESM and TypeScript config files.
ESM and TS syntax support
Prior to this PR, your tailwind.config.js file had to be in CommonJS format. This was sur...
8 Replies
i have these so it detects all files
Sorry for the delayed reply. I added those as well and reloaded VSCode and still no suggestions/auto-complete from the extension
do you mean to use it like this:
Or like this
I am trying to use it like the first like this:
Switched it to cjs and it started working so the extension does not appear to be a fan of tailwind.config.ts
I had the same problem - For me it was just that I hadn't installed the Tailwind Extension into VSCode
https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
Tailwind CSS IntelliSense - Visual Studio Marketplace
Extension for Visual Studio Code - Intelligent Tailwind CSS tooling for VS Code