Hey everyone,
Short version:
How to stop the removal of ‘ID’ and ‘Type’ attributes on a element inside ‘clean_html5_markup’ Soil task because it breaks the Webpack Critical CSS functionality.
Longer version (It’s not that long tbh… )
In Soil’s 4.0.4 “clean-up” module there is a task called “clean_html5_markup” which is breaking my Webpack’s Critical CSS functionality (This functionality is based on the existing guides)
Amongst the existing Critical/Async CSS posts/threads and guides, there’s a few other posts/comments confirming that others have encountered this issue as well, but the solutions only work with Soil v3.X and I’m using 4.0.4
To summarise, the Critical CSS generation fails because of the following two lines inside the Soil plugin which removes the ID and Type attributes inside the style_loader_tag filter. (Link)
How can we stop the function/filter from running which removes the attributes.
Any help really appreciated