Skip to content

Commit

Permalink
add better babel macro matching
Browse files Browse the repository at this point in the history
  • Loading branch information
FredKSchott committed Jun 8, 2020
1 parent e29619b commit 78a27ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scan-imports.ts
Expand Up @@ -175,7 +175,7 @@ function parseCodeForInstallTargets(fileLoc: string, code: string): InstallTarge
.map((imp) => parseImportStatement(code, imp))
.filter(isTruthy)
// Babel macros are not install targets!
.filter((imp) => !imp.specifier.endsWith('.macro'));
.filter((imp) => !/[./]macro(\.js)?$/.test(imp.specifier));
return allImports;
}

Expand Down

0 comments on commit 78a27ff

Please sign in to comment.