Why does line 3 break this example? It works fine with line 3 commented out.
<button id="button">Click me</button>
<script type="module">
import { foo } from "script.js"; // BREAKS THINGS
document.getElementById("button")
.addEventListener("click",
function(){ alert("hello") } );
</script>
Tested in MS Edge 93.