ember-cli-deploy-gzip is a plugin for the Ember CLI Deploy ecosystem, designed to perform in-place gzip compression of static assets as part of a deployment pipeline. Its primary function is to prepare files for upload to asset hosts that expect pre-compressed content, ensuring efficient delivery. The current stable version is 3.0.0, released recently with updated dependencies and Node.js version requirements, maintaining active development. While it does not follow a fixed release cadence, updates are typically driven by Ember CLI or Node.js compatibility needs, or bug fixes. A key differentiator is its seamless integration into the `ember-cli-deploy` workflow, allowing declarative configuration for which file types to compress, including an `ignorePattern` for specific exclusions. It also offers the option to use `node-zopfli` for stronger (though slower) compression. This plugin abstracts away the direct use of compression libraries, providing a higher-level, deployment-focused solution for Ember applications.
npm install ember-cli-deploy-gzipVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install `ember-cli-deploy-gzip` and configure it within `config/deploy.js` for an Ember CLI Deploy pipeline, typically alongside `ember-cli-deploy-build` and an asset-upload plugin like `ember-cli-deploy-s3`.
Ensure your project's Node.js environment is at version `14.x || 16.x || 18.x || >= 20.x`. Update `npm` or `yarn` dependencies if encountering package resolution issues.
If `zopfli: true` is configured, run `npm install node-zopfli --save-dev` or `yarn add node-zopfli --dev` in your project.
Ensure your `filePattern` and `ignorePattern` configurations in `config/deploy.js` exclude already compressed asset types. The default `filePattern` intelligently avoids common image formats.
Ensure `ember-cli-deploy-build` is installed (`ember install ember-cli-deploy-build`) and correctly configured in your deployment pipeline before `ember-cli-deploy-gzip`.
Install the `node-zopfli` package as a development dependency: `npm install node-zopfli --save-dev` or `yarn add node-zopfli --dev`.
Review the `filePattern` and `ignorePattern` settings in your `config/deploy.js`. Verify that `'gzip'` is present in the `plugins` array. Also, check if `keep: false` is set and you are looking for `.gz` files instead of the originals.
Upgrade your Node.js environment to a compatible version (e.g., `14.x || 16.x || 18.x || >= 20.x`) or downgrade `ember-cli-deploy-gzip` to a compatible version if your project cannot upgrade Node.js.