-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add OMIT_MODULE_EXPORTS to omit module code #12952
Conversation
Thank you for submitting a pull request! If this is your first PR, make sure to add yourself to AUTHORS. |
I would love to find a way to do this without adding a new settings if we can. However, I'm not familiar enough with MODULARIZE or the its users. Maybe there are other options such as completely removing the UMD style export stuff? Does the If we are going to add a new option I think we need a better name because both @RReverser has been battling with modularize recently so might have some insight into the right direction to go here. |
ES6 modules do work for the browser, but they make use on node.js more problematic (unless we want multiple builds, one for node, one for web). I'm fine with renaming the option to NO_UMD_EXPORTS so as not to be confusing with the Module object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kjlubick For your use case, can you build with EXPORT_ES6
(which would avoid emitting UMD code)?
Oh sorry, I just saw the last comment now. So ES6 modules don't work in node. Is there no way to ignore them there, or is it a syntax error? |
AFAIK, there is no way to ignore the export command in node.js |
Looking at flutter/flutter#58428, it seems that your issue is rather that it's an anonymous I thought these should work fine with Require.js, but, if not, maybe a better fix would be for us to generate some name there? |
Wait, ES6 modules do work in Node nowadays, and few versions ago got even unflagged. Can you try with latest Node.js version and set Emscripten's output extension to |
This export code is the root cause of flutter/flutter#58428 so we would like to be able to remove it.