Reputation: 121
Im using tailwindcss for my project. I run npm i tailwindcss -D
then i wrote followind code in my style.css
: @tailwind base; @tailwind components; @tailwind utilities;
and then run npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch
. But in my output.css
file i have only 400-500 lines of code. Meanwhile cdn file contains thousands of them. What am i doing wrong?
Upvotes: 0
Views: 977
Reputation: 554
So that is due to the latest version of the tailwind CSS V3. The JIT is enabled by default and it will only render the respective styles being used in the files mentioned in your config. That is perfectly an expected behavior, this can give you a good lead. https://youtu.be/mSC6GwizOag
Also you are using the --watch flag that will do the same.
Kindly try upgrading to the latest version of tailwindcss.
Upvotes: 2
Reputation: 11
Due to Tailwind's just in time mode, only the necessary code is generated to keep your project as small as possible.
Is tailwind working correct?
Upvotes: 1