Hello,
I’ve run into a slight problem when trying to upgrade a library.
Everything compiles/works but it seems that spago bundle-app
produces an output with all exports just as flat top-level function ....
in the generated JS.
In my case this will fail when the browser starts to interpret the file as it includes this:
// output/Web.HTML.Window/foreign.js
function document(window2) {
return function() {
return window2.document;
};
}
which will fail because document
is already defined.
Now --minify
in spago will solve this issue but I wonder if there is a way to use something like global name to wrap all into an object which seems safer in my opinion.