Skip to content

Commit

Permalink
fix(codegen-file): fix API call for entire file codegen (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: loynoir <loynoir@users.noreply.github.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
  • Loading branch information
3 people committed Sep 1, 2021
1 parent 4ed043c commit 15619a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/replace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function getReplacers(babel: typeof babelCore) {
path: babelCore.NodePath<babelCore.types.Program>,
fileOpts: babelCore.TransformOptions,
) {
// @ts-expect-error the types for this is wrong...
const result = babel.transformFromAstSync(path.node, {

const result = babel.transformFromAstSync(path.node, path.getSource(), {
filename: fileOpts.filename,
plugins: fileOpts.plugins,
presets: fileOpts.presets,
Expand Down

0 comments on commit 15619a9

Please sign in to comment.