mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 22:22:34 +03:00
fix(bundler): Fix bundler (#2510)
swc_bundler: - Consider usage in named export specifier while analyzing imports.
This commit is contained in:
parent
a8b29b662e
commit
cead404a53
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2431,7 +2431,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_bundler"
|
||||
version = "0.77.0"
|
||||
version = "0.77.1"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
|
@ -9,7 +9,7 @@ include = ["Cargo.toml", "build.rs", "src/**/*.rs", "src/**/*.js"]
|
||||
license = "Apache-2.0/MIT"
|
||||
name = "swc_bundler"
|
||||
repository = "https://github.com/swc-project/swc.git"
|
||||
version = "0.77.0"
|
||||
version = "0.77.1"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[features]
|
||||
|
@ -557,6 +557,8 @@ where
|
||||
}
|
||||
|
||||
fn visit_mut_export_named_specifier(&mut self, s: &mut ExportNamedSpecifier) {
|
||||
self.add_forced_ns_for(s.orig.to_id());
|
||||
|
||||
match &s.exported {
|
||||
Some(exported) => {
|
||||
debug_assert_eq!(
|
||||
|
2
bundler/tests/deno-exec/deno-11575/case1/input/entry.ts
Normal file
2
bundler/tests/deno-exec/deno-11575/case1/input/entry.ts
Normal file
@ -0,0 +1,2 @@
|
||||
import { foo } from "./temp2.ts";
|
||||
foo.hello(1);
|
3
bundler/tests/deno-exec/deno-11575/case1/input/temp2.ts
Normal file
3
bundler/tests/deno-exec/deno-11575/case1/input/temp2.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import * as foo from "./temp3.ts";
|
||||
export { foo };
|
||||
foo.hello(2);
|
3
bundler/tests/deno-exec/deno-11575/case1/input/temp3.ts
Normal file
3
bundler/tests/deno-exec/deno-11575/case1/input/temp3.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export function hello(n) {
|
||||
console.log("Hello", n);
|
||||
}
|
Loading…
Reference in New Issue
Block a user