benjamn / recast

JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in top level await parse

chema97ic opened this issue · comments

Hi!

Im trying to parse a script that has a simple top level await fetch("https://example.com") and recast is throwing Unexpected identifier error. Is there a way to let it know you are using a module instead of a normal script? the same way you can do with esprima?

Duplicate of #1154.