-
next.9 version had new parser that changed these nodes format to And if it indeed requires esprima |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
It’s not an esprima AST: it’s an estree, used by acorn/eslint/and much of the ecosystem. See https://github.com/remcohaszing/remark-mdx-images and https://github.com/remcohaszing/remark-mdx-frontmatter (the latter is closes to what you’re doing) |
Beta Was this translation helpful? Give feedback.
It’s not an esprima AST: it’s an estree, used by acorn/eslint/and much of the ecosystem.
mdxjsEsm
also have adata.estree
field of that AST.Those ASTs are used here so that we don’t have to parse the input again. And so that you don‘t have to deal with escaping issues.
See https://github.com/remcohaszing/remark-mdx-images and https://github.com/remcohaszing/remark-mdx-frontmatter (the latter is closes to what you’re doing)