Skip to content

Commit 800e7f9

Browse files
committed
1 parent c54df36 commit 800e7f9

File tree

5 files changed

+15
-1
lines changed

5 files changed

+15
-1
lines changed

lib/optimize/ConcatenatedModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ const getSymbolsFromScope = (s, untilScope) => {
173173
const allUsedNames = new Set();
174174
let scope = s;
175175
while (scope) {
176-
if (untilScope === scope) break;
177176
for (const variable of scope.variables) {
178177
allUsedNames.add(variable.name);
179178
}
179+
if (untilScope === scope) break;
180180
scope = scope.upper;
181181
}
182182
return allUsedNames;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Hello as t } from "./module2";
2+
3+
it("should rename classes correctly", () => {
4+
new t();
5+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export class Hello {}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import * as MODULE from "./module";
2+
let Hello = class Hello extends MODULE.Hello {}
3+
export { Hello }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
optimization: {
3+
concatenateModules: true
4+
}
5+
};

0 commit comments

Comments
 (0)