pub fn source_is_es_module(source: &str) -> boolExpand description
Heuristic: the source begins a line with a static import/export
and so must run as an ES module (bundled). Dynamic import(...) is
intentionally NOT matched — it is valid in a plain script, so such a
script keeps top-level return. A false positive only costs an
unnecessary bundle, never wrong output.