mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
This commit adds a new Program visitor to our Babel plugin which then calls our FunctionDeclaration visitor. Babel does some "smart" merging of plugin passes so so even if plugin A is inserted prior to plugin B, if A does not have a Program visitor and B does, B will run first. Note that we also can't use Forget inside of a Babel preset as plugins run _before_ presets (https://babeljs.io/docs/en/plugins/#plugin-ordering).