ember-cli-clean-css is an Ember CLI addon designed to integrate the `clean-css` library into an Ember.js application's build pipeline. It automatically minifies CSS files during development and production builds, aiming to optimize their size for improved loading performance. The current stable version, 3.0.0, primarily features an upgrade to `clean-css` version 5, bringing the latest minification capabilities and features. Its release cadence is generally aligned with updates to `ember-cli` and `clean-css`. This addon differentiates itself by offering a straightforward, low-configuration approach to CSS minification within the Ember ecosystem, directly hooking into the asset build process without requiring manual `clean-css` invocation or complex configuration, making it an essential tool for optimizing Ember application stylesheets.
npm install ember-cli-clean-cssVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to install the addon and provide basic configuration for `clean-css` options within your `ember-cli-build.js` file, including conditional source map generation.
Review your `ember-cli-clean-css` configuration options against the `clean-css` v5 documentation to ensure compatibility and desired output.
If advanced `clean-css` features (post v3) are required, upgrade to `ember-cli-clean-css` v3.0.0 or newer to utilize `clean-css` v5.
Upgrade to `ember-cli-clean-css@^2.0.1` or the latest version to resolve issues with relative URLs.
Check the `clean-css` documentation (version 5 for addon v3.x, version 3 for addon v2.x) for valid options and adjust your `ember-cli-build.js` configuration accordingly.
Upgrade `ember-cli-clean-css` to version `2.0.1` or higher (`npm install ember-cli-clean-css@latest` or `ember install ember-cli-clean-css`).
Update your Node.js environment to a compatible version (e.g., Node 16 or 18+). Use `nvm` or `volta` to manage Node.js versions effectively.