Build AST, find and replace tokens X, reconstruct file


#1

I’m trying to write an application that will consume ESM files and re-write the module resolution path but despite the detailed documentation I’m not really sure where to start.

Is Acorn in itself sufficient for building an AST, replacing entities and reconstructing a file?


#2

No. It’s a parser. You’ll need some other tools.