4.2.9 • Published 2 years ago

@nullvoxpopuli/ember-cli-esbuild v4.2.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@nullvoxpopuli/ember-cli-esbuild

npm Build Status

esbuild integration to ember-cli to minify your JavaScript.

Note that targeting ES5 is not supported.

Installation

  1. remove ember-cli-terser or ember-cli-ugfily
  2. yarn add --dev @nullvoxpopuli/ember-cli-esbuild
    # or
    npm install --save-dev @nullvoxpopuli/ember-cli-esbuild

Usage

After installing ember-cli-esbuild it will automatically hook into the build pipeline and minify your JS files in production builds.

If you want to customize how ember-cli-esbuild is running terser under the hood you have several configuration options available:

// ember-cli-build.js

var app = new EmberApp({
  'ember-cli-esbuild': {
    enabled: true,

    exclude: ['vendor.js'],
  },
});

Options

  • enabled?: boolean: Enables/Disables minification (defaults to true for production builds, false for development builds)

  • exclude?: string[]: A list of paths or globs to exclude from minification

  • sourceMap: the ESBuild sourcemap option. false, by default. Can be: 'linked', 'external', 'inline', 'both', or false. See ESBuild's docs for more info

Source Maps

Source maps are disabled by default for production builds in Ember CLI. If you want to enable source maps for production builds you can configure that in your ember-cli-build.js too:

// ember-cli-build.js

var app = new EmberApp({
  sourcemaps: {
    enabled: true,
    extensions: ['js'],
  },
});

Contributing

Debugging this plugin can be done with

JOBS=1 NODE_OPTIONS="--inspect-brk" ember test -e production

and then visit chrome://inspect in Google Chrome. you'll want to place a debugger somewhere in the broccoli code (located at ./lib/broccoli) so that execution pauses near the code you want to inspect.

License

ember-cli-esbuild is licensed under the MIT License.

4.2.9

2 years ago

4.2.7

3 years ago

4.2.6

3 years ago

4.2.8

3 years ago

4.2.5

3 years ago

4.2.4

3 years ago

4.2.3

3 years ago

4.2.2

3 years ago

4.2.1

3 years ago

4.2.0

3 years ago

4.1.0

3 years ago

0.0.1

3 years ago