From b39043f3ab0061f2db91514dbb69e85a49a99997 Mon Sep 17 00:00:00 2001 From: Jiavan Date: Fri, 1 Jun 2018 16:47:11 +0800 Subject: re-introduce `enclose` (#3163) fixes #2443 --- lib/minify.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/minify.js') diff --git a/lib/minify.js b/lib/minify.js index 399b8615..d84f6825 100644 --- a/lib/minify.js +++ b/lib/minify.js @@ -55,6 +55,7 @@ function minify(files, options) { try { options = defaults(options, { compress: {}, + enclose: false, ie8: false, keep_fnames: false, mangle: {}, @@ -157,6 +158,9 @@ function minify(files, options) { if (options.wrap) { toplevel = toplevel.wrap_commonjs(options.wrap); } + if (options.enclose) { + toplevel = toplevel.wrap_enclose(options.enclose); + } if (timings) timings.rename = Date.now(); if (options.rename) { toplevel.figure_out_scope(options.mangle); -- cgit v1.2.3