Adding Tailwind to Svelte project (Vite)

Just use svelte-add:

Bash
npx svelte-add@latest tailwindcss


Note that sometimes there's an issue with vite.config.js where the plugins[] block already has a tailwind config populated. In that case, just do something like this to use tailwind.config.cjs:

image2021-12-26_12-36-48.png

Not sure if this will make postcss use the postcss config file...