diff --git a/src/js_ast.zig b/src/js_ast.zig index 11cbcc9ba6..c21561a11a 100644 --- a/src/js_ast.zig +++ b/src/js_ast.zig @@ -550,6 +550,13 @@ pub const NamedImport = struct { // Parts within this file that use this import local_parts_with_uses: BabyList(u32) = BabyList(u32){}, + // The original export name from the source module being imported. + // Examples: + // - `import { foo } from 'module'` → alias = "foo" + // - `import { foo as bar } from 'module'` → alias = "foo" (original export name) + // - `import * as ns from 'module'` → alias_is_star = true, alias = "" + // This field is used by the bundler to match imports with their corresponding + // exports and for error reporting when imports can't be resolved. alias: ?string, alias_loc: ?logger.Loc = null, namespace_ref: ?Ref,