Skip to content

Commit

Permalink
fix(babel): only transform exported functions with meta
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 28, 2023
1 parent f875ae5 commit afa8dac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/loader/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ const babelPluginUntyped: PluginItem = function (
return;
}

// Do not add meta to internal functions
if (p.parent.type !== "ExportNamedDeclaration") {
return;
}

const _getLines = cachedFn(() => this.file.code.split("\n"));
const getCode: GetCodeFn = (loc) => {
const _lines = _getLines();
Expand Down

0 comments on commit afa8dac

Please sign in to comment.