Skip to content

Commit 396d55b

Browse files
committed
fill out webpack external for freestanding functions
Signed-off-by: karthik2804 <[email protected]>
1 parent a5bcab9 commit 396d55b

File tree

1 file changed

+7
-3
lines changed
  • packages/build-tools/crates/wit-tools/src

1 file changed

+7
-3
lines changed

packages/build-tools/crates/wit-tools/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,13 @@ impl WitMerger {
9090
imports.push(import_string);
9191
}
9292
}
93-
// TODO: Figure out how to deal with functions
94-
wit_parser::WorldItem::Function(_) => todo!(),
95-
// Do nothing for types because COomponentizeJS does not
93+
94+
wit_parser::WorldItem::Function(f) => {
95+
if f.kind == wit_parser::FunctionKind::Freestanding {
96+
imports.push(f.item_name().to_string());
97+
}
98+
}
99+
// Do nothing for types because ComponentizeJS does not
96100
// generate bindings for types
97101
wit_parser::WorldItem::Type(_) => {}
98102
}

0 commit comments

Comments
 (0)