Why is automatic file minification failing on my Shopify CDN?

Topic summary

Users are experiencing widespread minification failures on Shopify’s CDN, affecting hundreds of CSS and JavaScript files. The error messages indicate Shopify’s CDN is attempting to transform modern JavaScript (ES6) features—such as classes, const/let declarations, and object literal extensions—to ES5, but this transformation is not supported by their current tooling.

Key Technical Details:

  • Error appears across multiple official Shopify themes (Dawn, Studio, Debut, Ride, Refresh)
  • Affects files served through /cdn/shop/t/104/assets/
  • Started appearing around early July for some users
  • Also triggers SEMrush warnings about unminified files and low text-to-HTML ratios

Proposed Solutions:

  • One user created a GitHub repository with Gulp 4 + Babel pipeline to automatically minify and transpile ES6→ES5
  • Shopify support suggested using Babel or manually converting ES6 to ES5
  • Some developers recommend keeping ES6 and only minifying (not transpiling to ES5), as ES5 conversion often produces significantly larger file sizes that outweigh minification benefits

Current Status:
No official response from Shopify staff addressing why their CDN targets ES5 while themes use ES6. The discussion remains open with users seeking clarification on whether this impacts performance metrics (TTFB, FCP) and requesting official guidance.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

Hey,

I got it all set up, but I don’t think it works with the debut theme. :-1:

In github actions, it says its running. But I’m still getting that Shopify CDN: Minification failed.

Are you sure it works with debut version 17.13?

Thanks,

Maria

The GitHub actions must be successfully completed, not running.
Are you sure you opened the theme with the same ID you provided? Try to hard reload the page: Command(Ctrl) + R.
Try to open the minified theme through Code editor and check if the assets are minified there

I see that your files are already minified. Did my solution help you?

1 Like

Hi, do you have this for refresh theme? I’m having this same issue. I’ve been manually updating the JS which is tedious and difficult to locate all instances. I’ve also run into errors when trying to minify that don’t let me compress.

it suits any theme just add the CI/CD pipeline

Yes I did it! Thanks for the help

1 Like

To be honest I wouldn’t convert your es6 to es5. Regardless of the errors you get with es6. In most cases, this will give you much more code than necessary. Often even so much more than the minified version of your ES6.

So I would only minify the code myself, but certainly not convert it to es5. The only reason you would want to do that is if your user often uses older browsers. See the image below for a fairly simple example. Left ES6^, right ES5.