Ditching Astro...for now

Ditching Astro...for now

astro bugs tailwind github css

UPDATE Sep 12th 2022: As of today the Astro team have deployed a fix! So I’ll get started on the new Astro build soon hopefully

In my first post I mentioned I had used Astro to generate the static pages for this site. All was quite going well, initially, and I actually (still) really like Astro. However, that was back in v1.1.3 (or something), and there were still a few quirks around using Tailwind which meant I ended up ditching the Astro build step and just continuing with the static files.

What went wrong?

Essentially, when I create a global.css with my base Tailwind styles…

@tailwind base;
@tailwind components;
@tailwind utilities;

They would work fine on the development build, but once a production build would happen the global.css would end up second or last in the order inserted into the head.

At this time, I’m unable to get around it, so I’ve just had to revert to using the static build and fixing the order manually and continuing with the static files.

Hopefully this will be fixed in a future version of Astro, and I can go back to using it.

I’ve logged it with the Astro team as a bug so you can read more about the issue there: Issue #4614

Once it get’s fixed I’ll most likely resume using Astro once I have time to update it