We say a entry file src/index.js, when bundle with webpack, there are two version ast:
-
ast/ast-1.json is a ast snapshot in https://github.com/webpack/webpack/blob/main/lib/javascript/JavascriptParser.js#L3465
-
ast/ast-2.json is a ast snapshot in https://github.com/webpack/webpack/blob/v5.80.0/lib/javascript/JavascriptParser.js#L3475
the ast-1.json is legal, but ast-2.json is illegal(can't not be traversed by acorn-walk and can't not restore to source code)