diff --git a/src/ast/P.zig b/src/ast/P.zig index a9a48018d4..0bfdd9b6a7 100644 --- a/src/ast/P.zig +++ b/src/ast/P.zig @@ -2679,8 +2679,7 @@ pub fn NewParser_( const ref = try p.declareSymbol(.other, item.name.loc, name); p.bundler_feature_flag_ref = ref; } else { - // Warn about unknown specifiers - try p.log.addWarningFmt(p.source, item.alias_loc, p.allocator, "\"bun:bundle\" only exports \"feature\"; \"{s}\" will be undefined", .{item.alias}); + try p.log.addErrorFmt(p.source, item.alias_loc, p.allocator, "\"bun:bundle\" has no export named \"{s}\"", .{item.alias}); } } // Return empty statement - the import is completely removed diff --git a/src/ast/visitStmt.zig b/src/ast/visitStmt.zig index f85544a71d..6280c4d39e 100644 --- a/src/ast/visitStmt.zig +++ b/src/ast/visitStmt.zig @@ -40,9 +40,6 @@ pub fn VisitStmt( const visitors = struct { pub fn s_import(noalias p: *P, noalias stmts: *ListManaged(Stmt), noalias stmt: *Stmt, noalias data: *S.Import) !void { - // Note: `import { feature } from "bun:bundle"` is handled at parse time - // in processImportStatement(), not here at visit time. - try p.recordDeclaredSymbol(data.namespace_ref); if (data.default_name) |default_name| {