Reputation: 43
I make a vue project using this documentation: https://vuejs.org/guide/quick-start.html#creating-a-vue-application
And I wanted to added tailwind css to this project. So I used this guide (from point 2 Install Tailwind CSS
): https://tailwindcss.com/docs/guides/vite#vue
But, I see no changes and get this warning:
warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
warn - https://tailwindcss.com/docs/content-configuration
I followed the instuction as it is. I tried following the content-configuration and I double checked it to see all files in place.
I was expecting tailwind.config.cjs
file should be generated but instead tailwind.config.js
is generated.
Updates: On repeating all the steps using this link: https://tailwindcss.com/docs/guides/vite#vue
At step 4:
Add the Tailwind directives to your CSS
, When I replace the content for style.css
as asked in the step.. Exactly after this point, the error is shown.
Upvotes: 2
Views: 5886
Reputation: 1
I just gave solution to the same problem. You might have the same...
I had my tailwind.config.js like this:
module.exports = {
content: ["./src**/**/*.{html,js}"],
},
...and I changed the destination folder from "src" to "public", and it worked for me.
Like this:
module.exports = {
content: ["./public/**/*.{html,js}"],
},
Hope this will help you. Good luck and happy coding !
Upvotes: 0
Reputation: 43
Fixed.. Asking in the discord community this was the response:
Thank you for supplying a remotely-hosted repository. It seems to work fine for me, it could be that you're suffering from a bug that this PR solves: https://github.com/tailwindlabs/tailwindcss/pull/9650. You could temporarily try insiders version and see if that fixes it for you
npm install tailwindcss@insiders
Upvotes: 1