install with npm:
pnpm install astro-windicss -D
add to the integrations in your astro.config.*
import windicss from 'astro-windicss'
export default defineConfig({
//...
integrations: [windicss()]
})
then, restart the dev server. windicss's utility classes should be ready to go right away.Head to the windicss docs to learn how to use.
There are one way recommended is use config file, more detail: configuration docs
if you want import windicss whenever you like instead of auto import windicss, your can disabled it.
//...
integrations: [windicss({ astro: { autoImport: false } })]