Common misconception: ES Modules are required to do scope hoisting and static analysis.
-
-
You can also easily remove function wrappers from CJS modules by rewriting all local variables, constructing export objects and rewriting all local variables to refer to it, and compile anything else that requires() the file to refer to that object.
Show this thread -
Then you can do an optimizing pass to kill the object completely if it's never introspected. eg. you only ever refer to the object properties and never pass the bare reference around.
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 