Let’s talk about integrating tailwindcss because recent javascript ecosystem doens’t really work with Python but that’s cahnged. So

Django Tailwind CSS Tutorial

submited by
Style Pass
2022-05-20 19:00:09

Let’s talk about integrating tailwindcss because recent javascript ecosystem doens’t really work with Python but that’s cahnged. So now your question will be wait! Is it possible to integrate with tailwind without NPM?

The answer is Yes. We can integrate with tailwind without node ecosystem. There is a standalone version tailwind releases just for this specific use cases.

Because of the utility first approach the TailwindCSS is very large in nature. If you add this in your production it will slow your website very much. I highly recommend the second approach once you get through the production stage.

You have to remember that adding plugins by this method will further slow your websites. Production There is debug template variable in Django that we can use to detect the production and load that from the cache CSS file instead of the CDN one.

To generate a pure css out of your template you need to follow the second method. I say the second method is for the mature projects. For just a hobby one that you don’t need to run anything besides run server. Most suitable use cases will be the vscode code runner.

Leave a Comment