facebook / fbjs

A collection of utility libraries used by other Meta JS projects.
MIT License
1.95k stars 313 forks source link

Inline requires on exit #299

Closed mjesun closed 6 years ago

mjesun commented 6 years ago

Make sure the inliner executes on exit, so that all the changes that have happened with intermediate syntax (e.g. JSX) and values (e.g. other plugins) are fully set.

Also, when a require gets redefined, avoid inlining it. This can legitimately happen when using generic helpers like emptyObject or emptyFunction.