Netlify asset optimisation can cause problems with Hugo Pipes

Just posting this here in case anyone else has into the same problem.

My site uses a theme that takes advantage of hugo pipes for processing SCSS and JS assets. It had been working for a while, but some changes I made to the theme today broke the site on Netlify.

I worked out the problem was that I had opted for Netlify to do some asset optimisation—minifying and bundling CSS and JS. Before hugo was able to minify html and assets, this was probably a good thing. However, with the changes I made the SRI resource check began to fail as Netlify was changing things from what hugo had built.

Since I’m using hugo to minify things, I’ve turned off these Netlify settings - which not only means my site works, but since things aren’t being optimised twice, it’s probably saving some build time as well.