I have a simple HTML file that includes some simple javascript files. No framework, no modules. There is a main JS file and helper functions in other JS files.
When I open this as a static site, everything works. JS code in one file is able to call functions defined in another file.
When I try the parcel bundler, pointing it at the index.html file, parcel finds all my JS files and adds some stuff to the beginning, appends a hash to the filename and modifies the links in my HTML files. All great.
However, when I open this page in the browser, it turns out my code defined in one JS file is not able to see functions defined on other JS files, throwing ReferenceError: <func> is not defined. When I inspected the JS scripts included in the HTML page, the functions are indeed defined there in the global scope. How weird is that?