Skip to content

Commit

Permalink
Merge pull request embroider-build#1984 from embroider-build/audit-vi…
Browse files Browse the repository at this point in the history
…te-ignore

narrow the audit exception for vite internals
  • Loading branch information
mansona authored Jun 13, 2024
2 parents 966c541 + 98e04d9 commit 718cc64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/compat/src/audit/babel-visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ export function auditJS(rawSource: string, filename: string, babelConfig: Transf
codeFrameIndex: saveCodeFrame(arg),
specifiers: [],
});
} else if (arg.type === 'BinaryExpression') {
// ignore binary expressions. Vite uses these (somehow) in the `@vite/client` import
} else if (arg.leadingComments?.find(c => /@vite-ignore/.test(c.value))) {
// this is vite internals that we should ignore too
} else {
problems.push({
message: `audit tool is unable to understand this usage of ${
Expand Down

0 comments on commit 718cc64

Please sign in to comment.