Remember that you’re losing conversions with every extra second that it takes to load.
Aiming to help you reclaim those lost sales, Shopify shared 5 minification techniques to make your store fast. For those who don’t know, minification refers to the process of removing unnecessary or redundant data without affecting how the resource is processed by the browser.
Optimize CSS using cssnano: A modular minifier written in Node.js, cssnano can be added to your build process to ensure that the resulting stylesheet is as small as possible for a production environment.
Reduce HTML with a HTMLMinifier Webpack plugin: This is a plugin designed to minimize HTML files. Mind that you’ll need Webpack to use this plugin.
Create a build process using a range of minifiers: Here you can use toolkits like Gulp or Grunt, which allow developers to set up automation for many development tasks. Basically, you can implement plugins like UglifyJS into a Gulp task, instructing it to run every time a site is compiled.