-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User-inputted module's main
call called twice
#293
Comments
In case the issue has its root cause in guybedford/es-module-shims@1.5.9...1.5.12 Update: I don't think this will fix the issue. I could reproduce the issue in Firefox, but not in Chrome. Could be browser or version related (e.g. one needs shims and the other doesn't). https://discord.com/channels/864614189094928394/869607074152206397/1007075896005492837 |
I think I found the issue: The docs of
This is not the case for try.purescript.org. Adding An alternative described in the docs is to activate window.esmsInitOptions = { shimMode: true }
|
Yup, that's probably it. |
Cool, I see it both working (locally, 25a9095) and not working (try.purescript.org) at the same time using Firefox 103. Either there is a difference (not same code state, but I don't think so because the new comment is part of the html), frames behave differently on the domain compared to screencast-2022-08-27_19.52.49.mp4That makes it harder to reproduce locally, but the main issue is still the combination of iframes, settings listeners once, and Options
|
For what it's worth, every time I've tried fixing this locally, it appeared to be fixed locally only for it to not be fixed on the actual site. Hence, it's hard to know when this problem has actually been solved. |
Is the last suggested option viable? |
Opening up https://try.purescript.org/, I see that the module's
main
function is called twice, again. I thought this was fixed by #279, but maybe the recentes-module-shims
update to 1.5.9 broke something?The text was updated successfully, but these errors were encountered: