Registry / devops / ember-cli-esbuild-minifier

ember-cli-esbuild-minifier

JSON →
library6.1.0jsnpmunverified

Ember-CLI addon that integrates esbuild for JavaScript minification in production builds. Current stable version is 6.1.0 (July 2024), with active development releasing new versions weekly or monthly. Replaces ember-cli-terser or ember-cli-uglify with faster minification using esbuild. Supports configurable options including exclusion patterns, source maps (linked, external, inline, both), and esbuild target specification. Does not support ES5 target. Communicates via ESBuild's workerpool.

npm install ember-cli-esbuild-minifier
INSTALL
IMPORT
SIG · EMBER-CLI-ESBUILD-
E
ember-cli-esbuild-minifier
devopsjavascriptv6.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.

ember-cli-esbuild
// No import needed; addon hooks automatically after installation
const minifier = require('ember-cli-esbuild-minifier')
Package is an Ember addon; it hooks into the build pipeline automatically. No manual import required.
EmberApp config
new EmberApp({ 'ember-cli-esbuild': { enabled: true, target: 'es2020' } })
new EmberApp({ 'ember-cli-esbuild-minifier': { ... } })
Configuration key is 'ember-cli-esbuild' (not the package name with '-minifier'). Options go inside EmberApp constructor.
target option
target: ['es2020']
target: 'es5'
ES5 targeting is not supported by esbuild. Use at least ES2015. target can be string or string[].

Configures esbuild minification for production builds, excluding vendor.js, targeting ES2020, and generating external source maps.

// In your Ember app's ember-cli-build.js let app = new EmberApp(defaults, { 'ember-cli-esbuild': { enabled: true, exclude: ['vendor.js'], target: 'es2020', sourceMap: 'external' } }); module.exports = app.toTree();
Debug
Known issues
breakingES5 targeting is not supported by esbuild.
fix
Use 'target' option with a minimum of ES2015. For ES5 support, continue using ember-cli-terser.
affects: >=1.0.0
gotchaConfiguration key is 'ember-cli-esbuild' not 'ember-cli-esbuild-minifier'.
fix
Use the correct config key in ember-cli-build.js: new EmberApp({ 'ember-cli-esbuild': { ... } })
affects: >=1.0.0
gotchaRemove 'ember-cli-terser' or 'ember-cli-uglify' before installing to avoid conflicts.
fix
Run npm uninstall ember-cli-terser ember-cli-uglify before installing this addon.
affects: >=1.0.0
breakingSource maps disabled by default; must enable in ember-cli-build.js.
fix
Add sourcemaps config: new EmberApp({ sourcemaps: { enabled: true, extensions: ['js'] } })
affects: >=1.0.0
deprecatedSource map option 'none' is deprecated; use false instead.
fix
Set sourceMap: false instead of sourceMap: 'none'.
affects: >=6.0.0
Errors
Common errors & fixes
Cannot find module 'ember-cli-esbuild-minifier'
Package is named '@nullvoxpopuli/ember-cli-esbuild' on npm, not 'ember-cli-esbuild-minifier'.
fix
Install as '@nullvoxpopuli/ember-cli-esbuild' and configure in ember-cli-build.js under 'ember-cli-esbuild' key.
The Brocfile returned undefined, which is not a valid Broccoli tree.
Misconfiguration or missing module.exports = app.toTree() in ember-cli-build.js.
fix
Ensure ember-cli-build.js ends with module.exports = app.toTree();
ESBuild error: Top-level await is not available in the configured target environment
Target set too low (e.g., 'es2015') but code uses top-level await.
fix
Set target to at least 'es2022' or a modern browser that supports top-level await.
Upgrade
Version history
6.1.0latest on npm
Audit
Dependencies
esbuildrequiredCore minification engine
workerpoolrequiredManages parallel minification workers
Agent activity
2 hits · last 30 days
node
2
Resources
ember-cli-esbuild-minifier — npm install ember-cli-esbuild-minifier · libregistry