Registry / devops / ember-cli-html-minifier

ember-cli-html-minifier

JSON →
library1.1.0jsnpmunverified

Ember addon that uses html-minifier to minify HTML files (e.g., index.html) and inline JS/CSS during production builds. Version 1.1.0 is the latest stable release. This addon automatically activates on production builds but allows manual configuration via Brocfile.js. Differentiators: seamless integration with Ember CLI, sensible default minifier options (collapseWhitespace, removeComments, minifyJS, minifyCSS), and support for custom minifier options. Note: the underlying html-minifier library is deprecated in favor of html-minifier-terser, and this addon may not be actively maintained.

npm install ember-cli-html-minifier
INSTALL
IMPORT
SIG · EMBER-CLI-HTML-MIN
E
ember-cli-html-minifier
devopsjavascriptv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default export (EmberApp configuration)
// In Brocfile.js var app = new EmberApp({ minifyHTML: { enabled: true, htmlFiles: ['index.html'], minifierOptions: { ... } } });
// Wrong: importing a function from the addon import htmlMinifier from 'ember-cli-html-minifier';
This addon does not export any symbols; configuration is done via EmberApp options. No import needed.

Install and configure ember-cli-html-minifier for production HTML minification with default options.

npm install ember-cli-html-minifier --save-dev # Then in Brocfile.js: var app = new EmberApp({ minifyHTML: { enabled: true, htmlFiles: ['index.html'], minifierOptions: { collapseWhitespace: true, removeComments: true, minifyJS: true, minifyCSS: true } } });
Debug
Known issues
deprecatedThe html-minifier library used under the hood is deprecated; consider using html-minifier-terser instead.
fix
Switch to a different addon that uses html-minifier-terser, or configure your build pipeline directly.
affects: >=0.0.0
gotchaDefault minifier options only apply if the addon is enabled. If minifyHTML.enabled is false or not set, no minification occurs.
fix
Ensure minifyHTML.enabled is true (or rely on default production-only behavior).
affects: >=0.0.0
gotchaConfiguration key is 'minifyHTML' (camelCase) not 'minifyHtml' or others.
fix
Use exact key: minifyHTML in Brocfile.js.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Could not find module `ember-cli-html-minifier`
The addon is not installed or not saved in package.json.
fix
Run: npm install ember-cli-html-minifier --save-dev
Unrecognized option: minifyHTML
The configuration key 'minifyHTML' is being used but the addon is not properly detected by Ember CLI.
fix
Ensure the addon is installed and listed in package.json in the 'devDependencies' section.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
ember-cli-html-minifier — npm install ember-cli-html-minifier · libregistry