Skip to content

Commit

Permalink
fix: Replace body so fast-refresh function caching works
Browse files Browse the repository at this point in the history
Fixes #626
  • Loading branch information
Artur- committed Dec 15, 2024
1 parent 18b2f29 commit b113275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-transform/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ function transformFunction(
newFunction.leadingComments = [];

setData(path, alreadyTransformed, true);
path.replaceWith(newFunction);
path.get("body").replaceWith(newFunction.body);
}

function createImportLazily(
Expand Down

0 comments on commit b113275

Please sign in to comment.