Skip to content

Commit

Permalink
chore: use isScannable in optimizer scan (#7641)
Browse files Browse the repository at this point in the history
  • Loading branch information
y1d7ng committed May 10, 2022
1 parent 780b4f5 commit f18eedf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ export async function scanImports(config: ResolvedConfig): Promise<{
// Non-supported entry file types and virtual files should not be scanned for
// dependencies.
entries = entries.filter(
(entry) =>
(JS_TYPES_RE.test(entry) || htmlTypesRE.test(entry)) &&
fs.existsSync(entry)
(entry) => isScannable(entry) && fs.existsSync(entry)
)

if (!entries.length) {
Expand Down

0 comments on commit f18eedf

Please sign in to comment.