{"id":16990,"library":"ember-cli-deploy-gzip","title":"Ember CLI Deploy Gzip Plugin","description":"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.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/ember-cli-deploy/ember-cli-deploy-gzip","tags":["javascript","ember-addon","ember-cli-deploy-plugin"],"install":[{"cmd":"npm install ember-cli-deploy-gzip","lang":"bash","label":"npm"},{"cmd":"yarn add ember-cli-deploy-gzip","lang":"bash","label":"yarn"},{"cmd":"pnpm add ember-cli-deploy-gzip","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides `distDir` and `distFiles` which are prerequisites for this plugin.","package":"ember-cli-deploy-build","optional":false},{"reason":"Required only if the `zopfli` configuration option is set to `true` for stronger compression.","package":"node-zopfli","optional":true}],"imports":[{"note":"This command integrates the addon into your Ember CLI project's build and deploy pipeline, making it available for configuration.","wrong":"npm install ember-cli-deploy-gzip","symbol":"ember install command","correct":"ember install ember-cli-deploy-gzip"},{"note":"Ember CLI Deploy plugins are configured by their short name ('gzip' in this case) within the `plugins` array of your `config/deploy.js`, not via standard JavaScript module imports.","wrong":"import { gzip } from 'ember-cli-deploy-gzip';","symbol":"Gzip plugin inclusion","correct":"module.exports = function(deployTarget) { return { plugins: ['gzip'], ... }; };"},{"note":"Specific options for the `gzip` plugin are defined as a top-level property (`gzip`) within the deployment configuration object in `config/deploy.js`.","wrong":"app.import('node_modules/ember-cli-deploy-gzip/index.js');","symbol":"Gzip plugin configuration","correct":"module.exports = function(deployTarget) { return { gzip: { filePattern: '**/*.{js,css}' }, ... }; };"}],"quickstart":{"code":"// config/deploy.js\nmodule.exports = function(deployTarget) {\n  var ENV = {\n    build: {\n      environment: 'production'\n    },\n    gzip: {\n      filePattern: '**/*.{js,css,json,ico,map,xml,txt,svg,eot,ttf}', // Default pattern\n      // keep: true, // Example: keep original files and create .gz versions\n      // zopfli: true // Example: use zopfli for stronger compression (requires `node-zopfli` install)\n    }\n  };\n\n  if (deployTarget === 'production') {\n    // Example: configure S3 deployment alongside gzip\n    ENV.s3 = {\n      accessKeyId: process.env.AWS_ACCESS_KEY_ID ?? '',\n      secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY ?? '',\n      bucket: 'your-production-asset-bucket',\n      region: 'us-east-1'\n    };\n  }\n\n  // Include the necessary plugins in the deployment pipeline\n  ENV.plugins = ['build', 'gzip', 's3']; // 'build' and 's3' are common companions\n\n  return ENV;\n};\n\n// Terminal commands\n// 1. Ensure prerequisite Ember CLI Deploy plugins are installed (e.g., build, an asset host like s3)\n// $ ember install ember-cli-deploy-build\n// $ ember install ember-cli-deploy-s3\n// 2. Install this gzip plugin\n// $ ember install ember-cli-deploy-gzip\n// 3. Run the deployment\n// $ AWS_ACCESS_KEY_ID=\"YOUR_KEY\" AWS_SECRET_ACCESS_KEY=\"YOUR_SECRET\" ember deploy production\n","lang":"javascript","description":"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`."},"warnings":[{"fix":"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.","message":"Version 3.0.0 introduced breaking changes, primarily by updating internal dependencies and raising the minimum supported Node.js versions. Users on older Node.js runtimes (prior to 14.x) must upgrade.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"If `zopfli: true` is configured, run `npm install node-zopfli --save-dev` or `yarn add node-zopfli --dev` in your project.","message":"If the `zopfli` configuration option is set to `true` for stronger compression, the `node-zopfli` package must be manually installed as a development dependency. It is not bundled with `ember-cli-deploy-gzip`.","severity":"gotcha","affected_versions":">=0.2.2"},{"fix":"Ensure your `filePattern` and `ignorePattern` configurations in `config/deploy.js` exclude already compressed asset types. The default `filePattern` intelligently avoids common image formats.","message":"Certain file types, particularly image formats like `.png`, `.jpg`, and `.gif`, are already highly compressed and should generally not be gzipped again. Doing so can sometimes increase file size or offer negligible gains.","severity":"gotcha","affected_versions":"all"},{"fix":"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`.","message":"This plugin relies on the `distDir` and `distFiles` properties being present on the deployment `context` object. These are typically provided by the `ember-cli-deploy-build` plugin, which is a common prerequisite.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'3.0.0':63 'abstract':145 'activ':74 'addon':168 'allow':113 'also':129 'applic':164 'asset':30,47 'away':146 'bug':97 'cadenc':84 'cli':2,8,17,91,110,171 'compat':94 'compress':27,53,121,142,151 'configur':115 'content':54 'current':59 'declar':114 'deliveri':57 'depend':68 'deploy':3,9,18,35,111,159,172 'deployment-focus':158 'design':20 'develop':75 'differenti':101 'direct':148 'driven':88 'ecosystem':19 'effici':56 'ember':1,7,16,90,109,163,167,170 'ember-addon':166 'ember-cli-deploy':108 'ember-cli-deploy-gzip':6 'ember-cli-deploy-plugin':169 'ensur':55 'exclus':127 'expect':50 'file':43,118 'fix':82,98 'focus':160 'follow':80 'function':39 'gzip':4,10,26 'higher':156 'higher-level':155 'host':48 'ignorepattern':124 'in-plac':23 'includ':122 'integr':105 'javascript':165 'key':100 'level':157 'librari':152 'maintain':73 'need':95 'node':136 'node-zopfli':135 'node.js':70,93 'offer':130 'option':132 'part':32 'perform':22 'pipelin':36 'place':25 'plugin':5,13,144,173 'pre':52 'pre-compress':51 'prepar':42 'primari':38 'provid':153 'recent':65 'releas':64,83 'requir':72 'seamless':104 'slower':141 'solut':161 'specif':126 'stabl':60 'static':29 'stronger':139 'though':140 'type':119 'typic':87 'updat':67,85 'upload':45 'use':134,149 'version':61,71 'workflow':112 'zopfli':137","created_at":"2026-04-22T15:09:28.079676+00:00","updated_at":"2026-04-22T15:09:28.079676+00:00","problems":[{"fix":"Install the `node-zopfli` package as a development dependency: `npm install node-zopfli --save-dev` or `yarn add node-zopfli --dev`.","cause":"The `zopfli` option was enabled in `config/deploy.js` (e.g., `gzip: { zopfli: true }`) but the `node-zopfli` package was not installed.","error":"Cannot find module 'node-zopfli'"},{"fix":"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.","cause":"Incorrect `filePattern` or `ignorePattern` configuration, or `ember-cli-deploy-gzip` is not properly included in the `plugins` array in `config/deploy.js`.","error":"The Ember CLI Deploy pipeline executed, but files are not being gzipped as expected."},{"fix":"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.","cause":"Your current Node.js version is incompatible with the installed version of `ember-cli-deploy-gzip`, particularly after the v3.0.0 breaking change.","error":"Error: Node.js vX.X.X is not supported by ember-cli-deploy-gzip."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ember-cli-deploy/ember-cli-deploy-gzip","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/ember-cli-deploy-gzip","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-21","install_tag":null}}