fix(es/modules): Resolve jsc.paths for export alls (#6170)

This commit is contained in:
magic-akari 2022-10-16 08:25:55 +08:00 committed by GitHub
parent c3ba51f48e
commit 82cca674e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 0 deletions

View File

@ -69,4 +69,17 @@ where
src.value = new;
}
}
fn visit_mut_export_all(&mut self, n: &mut ExportAll) {
let mut src = &mut n.src;
let new = self
.resolver
.resolve_import(&self.base, &src.value)
.with_context(|| format!("failed to resolve import `{}`", src.value))
.unwrap();
src.raw = None;
src.value = new;
}
}

View File

@ -0,0 +1,3 @@
import "@/a.js";
export {} from "@/a.js";
export * from "@/a.js";

View File

@ -0,0 +1,5 @@
{
"@/*": [
"./src/*"
]
}

View File

@ -0,0 +1,3 @@
import "./src/a.js";
export { } from "./src/a.js";
export * from "./src/a.js";