If I have an ES6 JS file (test.js) ...
export default function() {
let foo = "test"
return foo
}
With Babel, is it possible to transpile and call it in an index.html file
<script src="js/text-min.js"></script>
And start using the function without needing to import it into another js file? For Ex. the next script tag after would have the following code. This is in use with Webpack --
<script>
var bar = new foo();
console.log(bar);
</script>