Very first try on Nuxt3 via Nuxt3 Starter
I wonder how can I use tailwindcss in Nuxt3 Starter manually.
(Not via @nuxtjs/tailwindcss , because it's for Nuxt2, and not work with Nuxt3.)
I created a blank Nuxt3 project by
npx degit "nuxt/starter#v3" my-nuxt3-project
then, I installed the tailwindcss manually
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
nuxt.config.ts
export default {
css: [
'~/assets/tailwind.css',
]
}
assets/tailwind.css
@tailwind base;
@tailwind components;
@tailwind utilities;
but I can only get the raw code but not the compiled css:
How can I use tailwindcss in Nuxt3?
Any help is greatly appreciated!
update:
@nuxtjs/tailwindcss is already supported in Nuxt3