diff --git a/build/Gruntfile.js b/build/Gruntfile.js index b91d18acbb..19955cf78c 100644 --- a/build/Gruntfile.js +++ b/build/Gruntfile.js @@ -458,6 +458,9 @@ module.exports = function(grunt) { }, inline: { + options: { + uglify: true + }, dist: { src: '<%= pkg.main.copy.indexhtml[0].dest %>/*.html' } diff --git a/build/plugins/grunt-inline/tasks/inline.js b/build/plugins/grunt-inline/tasks/inline.js index 3536237182..77a1f4da79 100644 --- a/build/plugins/grunt-inline/tasks/inline.js +++ b/build/plugins/grunt-inline/tasks/inline.js @@ -135,7 +135,15 @@ module.exports = function(grunt) { let c = rawstr; if ( options.uglify ) { - const uglstr = UglifyJS.minify(rawstr); + const opts = { + output: { + comments: false, + beautify: false, + }, + mangle: false, + compress: false, + }; + const uglstr = UglifyJS.minify(rawstr, opts); if ( uglstr.error == undefined ) c = uglstr.code; else grunt.log.error("uglify error " + uglstr.code);