I'm using parcel, and I'm trying to use ES6 import and export syntax. Parcel seems to run babel underground, I'm very new to it. When openimn the index.html placed on "dist" folder it does not render well and shows this error in console: "Uncaught TypeError: (0 , _module.importedHi) is not a function"
This the code in the exporting JS file:
export const importedHi = document.write("Hello world")
And this is the code of the main.js:
import {importedHi} from "./module1";
importedHi()
And this is the script im using in index.html
<script src="js/main.js"></script>
What do I have to configure so that this works properly?