Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deep defaulting of minification options. #229

Merged
merged 1 commit into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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