I really like UnoCSS but prefer the Tailwind extension because I find it has better intellisense and a bit better performance. Here’s how to use the Tailwind extension together with UnoCSS:
- Install the Tailwind extension in VSCode.
- Install the Tailwind package as a dev dependency.
npm i --save-dev tailwindcss
note that we’re not really using it, this is just for the extension to start. - Add a
tailwind.config.js
(or .ts) file:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./src/**/*.{html,js,svelte}"],
};
That’s it!