Webpack version:
webpack 2.1.0-beta.25
Please tell us about your environment:
Windows 10
a.js
"use strict";
export const test = {
a: "b"
};
test.js
"use strict";
import { test } from "./a";
class Test {
constructor() {
this.internalProp = {
test: {
d: "e"
}
};
}
test() {
const { test } = this.internalProp;
console.log(test);
}
}
new Test().test();
webpack.config.js
"use strict";
module.exports = {
entry: "./test.js",
output: { filename: "main.js" }
};
Part of transpiled output:
/***/ function(module, exports, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__a__ = __webpack_require__(0);
"use strict";
class Test {
constructor() {
this.internalProp = {
test: {
d: "e"
}
};
}
test() {
const { test } = this.internalProp;
console.log(__WEBPACK_IMPORTED_MODULE_0__a__["a" /* test */]);
}
}
new Test().test();
/***/ }
Notice it uses imported test rather then local const varaible.
I think this is very serious bug and it should be fixed asap.
Webpack version:
webpack 2.1.0-beta.25
Please tell us about your environment:
Windows 10
a.js
test.js
webpack.config.js
Part of transpiled output:
Notice it uses imported test rather then local const varaible.
I think this is very serious bug and it should be fixed asap.