Skip to content

Instantly share code, notes, and snippets.

@krisselden
Last active September 17, 2016 23:35
Show Gist options
  • Save krisselden/c43d47be74dcc3e870a8c014c6e68079 to your computer and use it in GitHub Desktop.
Save krisselden/c43d47be74dcc3e870a8c014c6e68079 to your computer and use it in GitHub Desktop.
uglify dead code fixed in current release
define("module", ["exports"], function (exports) {
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Foo = function Foo() {
_classCallCheck(this, Foo);
};
exports.Foo = Foo;
});
uglifyjs dead_code.js -c --pure-funcs _classCallCheck
define("module",["exports"],function(exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var Foo=function Foo(){_classCallCheck(this,Foo)};exports.Foo=Foo});
uglifyjs dead_code.js -c negate_iife=false --pure-funcs _classCallCheck
define("module",["exports"],function(exports){"use strict";var Foo=function Foo(){};exports.Foo=Foo});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment