Hi,
I am getting strange errors when I include two Nim compiled programs in the same webpage. The scripts are separate, but if I include only one, it works. Including two of them and I'm getting strange errors in the JSON module, or malfunctions that are difficult to reproduce.
I'm thinking that maybe the script overwrite each other functions or variables. It's possible since in both scripts, I use the same Nim modules.
I'm also thinking that since now JavaScript modules landed in browsers, perhaps Nim could target a javascript module with export directives instead of a script to include inline on a webpage.
I'll investigate more, but the error shows on these pages (the first contains both examples and fails somehow):
I'm also thinking that since now JavaScript modules landed in browsers, perhaps Nim could target a javascript module with export directives instead of a script to include inline on a webpage.
Keep in mind that a lot of us want to have support for a large variety of browsers, and this includes old ones. It would be preferable to fix the issues to allow multiple JS files to work via Nim.