Skip to content

Commit

Permalink
Create variable declaration if adding at the top of the page
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Oct 19, 2023
1 parent bf49e34 commit 2172b0b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ export const addNamedModule = (
}

// Insert require declarator at the top of the document.
source.get().node.program.body.unshift(v3RequireDeclarator);
source.get().node.program.body.unshift(j.variableDeclaration("const", [v3RequireDeclarator]));
};

0 comments on commit 2172b0b

Please sign in to comment.