Skip to content

Commit

Permalink
fix: usage of @babel/generator in esm mode (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey authored May 4, 2023
1 parent 7a295ea commit 4163023
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/get-original-code.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ParserOptions } from "prettier";
import { Node } from "../constants";
import locToPos from "./loc-to-pos";
import generate from "@babel/generator";
import * as babelGenerator from "@babel/generator";
const generate = babelGenerator.default;

export function getOriginalCodeForNode(opts: ParserOptions<Node>, node: Node) {
const literal = literalToString(node);
Expand Down

0 comments on commit 4163023

Please sign in to comment.