Well written post 👏 This is a "no-hassle" way of setting up tailwind with CRA 👍
However, I feel I have to point out one major drawback to this approach; the output css includes ALL the styles of tailwind 😢 Ideally, you would like postcss to purge all unused utility-classes, so you end up with a really slim CSS file.
A way around this is to setup CRA with craco, but this comes with a bit more hassle 😐
I would love to see a JIT implementation working with CRA, but as far as I understand, this will not be possible until CRA internally updates the PostCSS dependency 🤔
Well written post 👏 This is a "no-hassle" way of setting up tailwind with CRA 👍
However, I feel I have to point out one major drawback to this approach; the output css includes ALL the styles of tailwind 😢 Ideally, you would like postcss to purge all unused utility-classes, so you end up with a really slim CSS file.
A way around this is to setup CRA with craco, but this comes with a bit more hassle 😐
I would love to see a JIT implementation working with CRA, but as far as I understand, this will not be possible until CRA internally updates the PostCSS dependency 🤔
what if we upgrade postcss manually?
I don't think it is possible, due to a constraint in CRA (even with craco). If this however has changed, please let me know!
yeah, CRA does not let us to do that, but after some hours I found (created) a way to use jit feature alongside react.and it feels so good using it.
Hello.
How did you achieve that?
Actually I wrote a blog post about it. Here it is:
dev.to/akov/how-to-set-up-tailwind...
Thanks Ako. Let me check it out.