Not working Tailwind @apply in Laravel Nova tool

Viewed 299

I'm using Laravel Nova v3.27.0 and tailwind's classes are works fine, but I cant create tailwind component. The apply is not working.

// Nova Tool CSS
.btn{
    @apply font-bold py-2 px-4 rounded;
}
.btn-big{
    font-size: 50px;
}

Gets me this in inspector

.btn{
}
.btn-big{
    font-size: 50px;
}

What I'm doing wrong?

1 Answers

are you doing a rebuild after you add this? perhaps you need to run something like this:

npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch

or does Nova use https://laravel.com/docs/8.x/mix?

in which case you can run

npm run dev or npm run production to generate the css with the new .btn class

Related