Skip to content

Commit

Permalink
Async dependencies aren't analyzed
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 5, 2021
1 parent b387f0e commit 3e6025b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/transformers/js/src/JSTransformer.js
Expand Up @@ -776,9 +776,6 @@ export default (new Transformer({
.getDependencies()
.map(dep => [dep.meta.placeholder ?? dep.specifier, dep]),
);
for (let dep of deps.values()) {
dep.symbols.ensure();
}
asset.symbols.ensure();

for (let {exported, local, loc, source} of symbol_result.exports) {
Expand All @@ -789,6 +786,7 @@ export default (new Transformer({
convertLoc(loc),
);
if (dep != null) {
dep.symbols.ensure();
dep.symbols.set(
local,
`${dep?.id ?? ''}$${local}`,
Expand All @@ -801,12 +799,14 @@ export default (new Transformer({
for (let {source, local, imported, loc} of symbol_result.imports) {
let dep = deps.get(source);
if (!dep) continue;
dep.symbols.ensure();
dep.symbols.set(imported, local, convertLoc(loc));
}

for (let {source, loc} of symbol_result.exports_all) {
let dep = deps.get(source);
if (!dep) continue;
dep.symbols.ensure();
dep.symbols.set('*', '*', convertLoc(loc), true);
}
}
Expand Down

0 comments on commit 3e6025b

Please sign in to comment.