index.js
function(options) {
    if (config.sourcemaps) {
        options = _.defaults(
            options,
            { devtool: '#source-map' }
        );
    }

    if (config.production) {
        var currPlugins = _.isArray(options.plugins) ? options.plugins : [];
        options.plugins = currPlugins.concat([new UglifyJsPlugin({ sourceMap: false })]);
    }

    return options;
}
function(options) {
    if (config.sourcemaps) {
        options = _.defaults(
            options,
            { devtool: '#source-map' }
        );
    }

    if (config.production) {
        var currPlugins = _.isArray(options.plugins) ? options.plugins : [];
        options.plugins = currPlugins.concat([new UglifyJsPlugin({ sourceMap: false })]);
    }

    return options;
}
function ( options ) { if ( config . sourcemaps ) { options = _ . defaults ( options , { devtool : '#source-map' } ) ; } if ( config . production ) { var currPlugins = _ . isArray ( options . plugins ) ? options . plugins : [ ] ; options . plugins = currPlugins . concat ( [ new UglifyJsPlugin ( { sourceMap : false } ) ] ) ; } return options ; }
Add sensitive default values to webpack options such as sourcemaps and
minification.

@param {object} options
@return {object}
Add sensitive default values to webpack options such as sourcemaps and minification .