metro-minify-terser
Advanced tools
Comparing version 0.48.0 to 0.48.1
{ | ||
"name": "metro-minify-terser", | ||
"version": "0.48.0", | ||
"version": "0.48.1", | ||
"description": "🚇 Alternative minifier for Metro", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -11,6 +11,6 @@ /** | ||
'use strict'; | ||
"use strict"; | ||
const minifier = require('./minifier'); | ||
const minifier = require("./minifier"); | ||
module.exports = minifier; | ||
module.exports = minifier; |
@@ -11,12 +11,19 @@ /** | ||
'use strict';var _extends = Object.assign || function (target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i];for (var key in source) {if (Object.prototype.hasOwnProperty.call(source, key)) {target[key] = source[key];}}}return target;}; | ||
"use strict"; | ||
var _extends = | ||
Object.assign || | ||
function(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
} | ||
return target; | ||
}; | ||
const terser = require('terser'); | ||
const terser = require("terser"); | ||
function minifier(options) { | ||
@@ -35,22 +42,24 @@ const result = minify(options); | ||
function minify(_ref) | ||
function minify(_ref) { | ||
let code = _ref.code, | ||
map = _ref.map, | ||
reserved = _ref.reserved, | ||
config = _ref.config; | ||
const options = _extends({}, config, { | ||
mangle: _extends({}, config.mangle, { | ||
reserved | ||
}), | ||
sourceMap: map | ||
? _extends( | ||
{}, | ||
config.sourceMap, | ||
{ | ||
content: map | ||
} | ||
) | ||
: false | ||
}); | ||
{let code = _ref.code,map = _ref.map,reserved = _ref.reserved,config = _ref.config; | ||
const options = _extends({}, | ||
config, { | ||
mangle: _extends({}, | ||
config.mangle, { | ||
reserved }), | ||
sourceMap: map ? _extends({}, | ||
config.sourceMap, { | ||
content: map }) : | ||
false }); | ||
const result = terser.minify(code, options); | ||
@@ -66,6 +75,6 @@ | ||
// $FlowFixMe flow cannot coerce the uglify options after using spread. | ||
map: result.map }; | ||
map: result.map | ||
}; | ||
} | ||
module.exports = minifier; | ||
module.exports = minifier; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4043
76