Closed andreypopp closed 10 years ago
See referenced React issue for numbers.
cc @benjamn
I agree that recast
is overkill here, since all envify
needs is to replace expressions in place. Recast maintains more metadata about the AST in order to handle more complicated transformations, and that has a cost (that can be avoided here).
@andreypopp that's an impressive speed boost, thanks for this! Published as envify@1.2.0
:)
This gains us a massive speedup, envify w/ recast takes almost 7 secs on my MBA when browserifying React codebase. While envify w/ jstransform brings this down to 1.5 sec (pre-recast speed) and delivers the same advantages as recast transform (preserves code formatting).