facebook / fbjs

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

Safe fallback if an inlinement cannot happen #327

Closed mjesun closed 5 years ago

mjesun commented 5 years ago

In order to be able to inline requires in code that still contains import/export, types, etc; we need to avoid it crashing when an unsupported inlinement happens. We also make sure to not fully remove the require if it happens, which means that code will still work if the require is really needed.