#6663 fixed an issue where @module("..") external .. would also emit a static import. But it looks like external + dynamic import isn't very well supported if the external is an arrow. Here's a playground link.
Wondering if that's on purpose or an oversight. Obviously you can extract the arrow to type f = string => unit or something along those lines, but that disables a few optimizations and you can't use attributes such as @unwrap and friends.