From 9ef2b5a00352d1ba5353426f144737761776717c Mon Sep 17 00:00:00 2001 From: Peter Jaszkowiak Date: Thu, 25 May 2017 11:37:58 -0600 Subject: [PATCH] Don't use uglify compress --- src/meta/minifier.js | 5 ++--- test/build.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/meta/minifier.js b/src/meta/minifier.js index 5e78203c26..e9b6243d2f 100644 --- a/src/meta/minifier.js +++ b/src/meta/minifier.js @@ -206,6 +206,7 @@ function minifyJS_batch(data, callback) { url: filename + '.map', includeSources: true, }, + compress: false, }); async.parallel([ @@ -257,9 +258,7 @@ function minifyJS(data, callback) { url: data.filename + '.map', includeSources: true, }, - compress: { - hoist_funs: false, - }, + compress: false, }); async.parallel([ diff --git a/test/build.js b/test/build.js index b8c90f57e4..9fc8230992 100644 --- a/test/build.js +++ b/test/build.js @@ -70,7 +70,7 @@ describe('minifier', function () { assert.strictEqual( fs.readFileSync(destPath).toString(), - '!function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}}(window,document);function foo(n,o){return\'The person known as "\'+n+\'" is \'+o+" years old"}' + + '(function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}})(window,document);function foo(n,o){return\'The person known as "\'+n+\'" is \'+o+" years old"}' + '\n//# sourceMappingURL=minified.js.map' ); done(); @@ -88,7 +88,7 @@ describe('minifier', function () { assert.ifError(err); assert.strictEqual( buffer.toString(), - '!function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}}(window,document);' + + '(function(n,o){n.doStuff=function(){o.body.innerHTML="Stuff has been done"}})(window,document);' + '\n//# sourceMappingURL=1.js.map' ); done();