Skip to content

Commit

Permalink
fix: inner graph for classes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Jan 23, 2024
1 parent f857674 commit 3022995
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/optimize/InnerGraphPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ class InnerGraphPlugin {
element.key ? element.key.range[1] : element.range[0]
)
) {
InnerGraph.setTopLevelSymbol(parser.state, fn);
if (element.type !== "MethodDefinition" && element.static) {
InnerGraph.setTopLevelSymbol(parser.state, fn);
InnerGraph.onUsage(parser.state, usedByExports => {
switch (usedByExports) {
case undefined:
Expand All @@ -294,6 +294,8 @@ class InnerGraphPlugin {
}
}
});
} else {
InnerGraph.setTopLevelSymbol(parser.state, undefined);
}
} else {
InnerGraph.setTopLevelSymbol(parser.state, undefined);
Expand Down

0 comments on commit 3022995

Please sign in to comment.