Skip to content
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

Use var module to prevent emcc pollution #518

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xnuk
Copy link

@xnuk xnuk commented Jun 13, 2022

for make 'use strict' compatible

@lovasoa
Copy link
Member

lovasoa commented Jun 13, 2022

Looking at the comment above, it looks like the variable is referencing the global module on purpose.

https://nodejs.org/api/modules.html#module

@lovasoa lovasoa closed this Jun 13, 2022
@xnuk
Copy link
Author

xnuk commented Jun 13, 2022

I think it's okay, because its purpose is removing if (typeof module !== 'undefined') { module['exports'] = Module } in the emcc output. Currently emcc output does not use globalThis.module, window.module, or something else.

@lovasoa
Copy link
Member

lovasoa commented Jun 13, 2022

Ok ! Can you add a comment about that above, then ?

@lovasoa lovasoa reopened this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants