Skip to content

Commit

Permalink
Merge pull request #229 from ember-cli/remove-deep-defaulting
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue authored Sep 8, 2020
2 parents 028f395 + 0978386 commit c51ffed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var app = new EmberApp({
- `terser?: TerserOptions`: A hash of [options](https://github.com/terser/terser#minify-options)
that are passed directly to terser

If no `terser` option is passed, a default configuration will be used.

### Source Maps

Expand Down
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ module.exports = {
included(app) {
this._super.included.apply(this, arguments);

const defaults = require('lodash.defaultsdeep');

let defaultOptions = {
enabled: app.env === 'production',

Expand Down Expand Up @@ -39,7 +37,7 @@ module.exports = {
addonOptions = Object.assign({}, addonOptions, { terser: addonOptions.uglify, uglify: undefined });
}

this._terserOptions = defaults(addonOptions, defaultOptions);
this._terserOptions = Object.assign({}, defaultOptions, addonOptions);
},

_sourceMapsEnabled(options) {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"test": "ember test -e production"
},
"dependencies": {
"broccoli-terser-sourcemap": "^4.1.0",
"lodash.defaultsdeep": "^4.6.1"
"broccoli-terser-sourcemap": "^4.1.0"
},
"engines": {
"node": "10.* || 12.* || >= 14"
Expand Down

0 comments on commit c51ffed

Please sign in to comment.