diff --git a/config/uglifyjs.config.js b/config/uglifyjs.config.js new file mode 100644 index 000000000..38a263a29 --- /dev/null +++ b/config/uglifyjs.config.js @@ -0,0 +1,19 @@ +// Check https://github.com/mishoo/UglifyJS2/tree/harmony#minify-options-structure +module.exports = { + /** + * mangle: uglify 2's mangle option + */ + mangle: { + keep_classnames: true, + keep_fnames: true + }, + /** + * compress: uglify 2's compress option + */ + compress: { + toplevel: true, + pure_getters: true + }, + keep_classnames: true, + keep_fnames: true +} \ No newline at end of file diff --git a/package.json b/package.json index 6a7dcf782..fd8994236 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "config": { "ionic_webpack": "./config/webpack.config.js", "ionic_copy": "./config/copy.config.js", + "ionic_uglifyjs": "./config/uglifyjs.config.js", "ionic_sass": "./config/sass.config.js" }, "repository": {