I have tried this with two separate Vite setups for Shopify and I'm receiving the same problem. It's not liking the conversion to ES5, or it's not doing it at all and Shopify doesn't agree with it.
The Problem
I find this in the main scripts file that Vite generates in the assets directory.
/** Shopify CDN: Minification failed
Line 16:108 Transforming let to the configured target environment ("es5") is not supported yet
... and 366 more hidden warnings
**/
The most recent guiding I have been following is https://shopify-vite.barrelny.com/guide/
Please let me know if I need to add more detail, I'm not sure what else to write.
- Node Version: v20.2.0
- NPM Version: 9.6.6
- Vite: ^4.4.9
- "vite-plugin-shopify": "^2.1.1"
- "npm-run-all": "^4.1.5"
- "@by-association-only/vite-plugin-shopify-clean": "^1.1.0"