We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76b0759 commit 1f6d53cCopy full SHA for 1f6d53c
src/utils/getAst.js
@@ -1,8 +1,8 @@
1
-var acorn = require("acorn");
2
-var jsx = require("acorn-jsx");
+import { Parser } from "acorn";
+const jsx = require("acorn-jsx");
3
4
export default function getAst(code) {
5
- return acorn.Parser.extend(jsx()).parse(code, {
+ return Parser.extend(jsx()).parse(code, {
6
ecmaVersion: 2019,
7
sourceType: "module"
8
});
0 commit comments