TypeScript Language Service Plugin to make classNames() type-safe for Tailwind.css
// npm npm i --save-dev irontail // yarn yarn add -D irontail Just add to tsconfig.json
"plugins": [ { "name": "irontail", } ] Q. There is already muhammadsammy/tailwindcss-classnames. Why is this plugin useful?
A. irontail just provides error checker out of the box, instead of type generator.
When you use type generator,
- You have to pre-generate typings with CLI
- Intellisense becomes inferior to existing extensions (like bradlc.vscode-tailwindcss)
- Currently, JIT mode is not supported ( it will break ).
- muhammadsammy/tailwindcss-classnames: The prior art
- Quramy/ts-graphql-plugin: Used as reference for the project structure
