How do you call a function from a module JavaScript file from an onclick or normal JavaScript.
In the code below the button click throws a "exampleFunction is not defined" exception (testing with the latest FireFox version and looking to be compatible with modern browsers)
exampleModule.js
export function exampleFunction(){
alert('example Function');
}
examplePage.html
<html>
<head>
<script src="exampleModule.js" type="module"></script>
</head>
<body>
<button onclick="exampleFunction();">button</button>
</body>
</html>