Create ESM build
I do not sure that I will understand whole impact on the EMCC modularization, but at least these fixes in the modularization works for me in the Blazor applciation, which is by itself ESM environment.
closes #524
@lovasoa can you take a look again?
Hi and thank you for the contribution!
This looks like this duplicates existing code, doesn't it?
Maybe the best place for a fix is inside emscripten itself?
I’m Windows developer by heart. I really would like to help, but because of one my quirk where I love to have native Windows build for everything I may go down to very deep rabbit hole. Given that I have no idea what’s an issue with Emscripten you are mention in comment, my second fear is that go down that route and dont come back.
I may pinky swear that I will try that and come back within week, but if not I would appreciate if you merge this as is. Will this work for you?
Or maybe you have other ideas how we can solve that?