don't inline classes and functions when they're in different scopes in the utility.deadCodeElimination transformer

This commit is contained in:
Sebastian McKenzie
2015-05-25 03:33:12 +01:00
parent 8e2b743f7e
commit 73ada57a17
4 changed files with 15 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
class A {
constructor() { this.value = 12345; }
}
export default new A();

View File

@@ -3,12 +3,9 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
var A = function A() {
exports["default"] = new function A() {
babelHelpers.classCallCheck(this, A);
this.value = 12345;
};
exports["default"] = new A();
}();
module.exports = exports["default"];

View File

@@ -1,6 +1,6 @@
"use strict";
var A = (function () {
var a = new ((function () {
function A() {
babelHelpers.classCallCheck(this, A);
}
@@ -12,6 +12,4 @@ var A = (function () {
}
}]);
return A;
})();
var a = new A();
})())();