Thanks for the input. I tried this method previously using postcss-purgecss and it had the same issue, but I tried again using the purge option in the tailwind config and still nearly everything is purged.
It works as expected with the demo site in the theme repo which makes me wonder:
Is it a problem with the blog repo’s build process? The github workflow is nearly identical to the demo site’s.
Is the directory structure or configuration of the blog repo incorrect somehow?
These are the most noticeable differences between the functioning and disfunctioning repo.
Also to note: The css is purged correctly in local builds of each repo.
I mimicked the directory structure of the theme repo by symlink’ing the main directory into the theme dir and building from there. For some reason, this worked. Perhaps something to do with how the purge contents are specified in the tailwind config.
Additional insights would still be valuable as this seems like a hack…