For importing into HTML, just use the script tag. For js files importing other js files use the export and import statements. You can see an example of how to use these here…
Thank you @Martyr2 . What I did was, I included the properties.js file containing all global variables in index.html using <script> tag and used it like the following:
location.href = envUrl + '/Builder/builder.html';
I included properties.js in builder.html using <script> tag and then I didn’t need to import it in builder.js and I could just use envURL in my builder.js file.
Cool. I would still advise you to take a look at the import/export statements and understand them. Including all files into the HTML directly can work, but there will be times where you will want/need to import directly to the JS files. There is a reason that the import/export statements were created.