Skip to content

Commit ed875f8

Browse files
authored
chore: revert #15746 (#15839)
1 parent e0a6ef2 commit ed875f8

File tree

1 file changed

+3
-4
lines changed
  • packages/vite/src/node/optimizer

1 file changed

+3
-4
lines changed

packages/vite/src/node/optimizer/scan.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -239,16 +239,15 @@ function orderedDependencies(deps: Record<string, string>) {
239239
}
240240

241241
function globEntries(pattern: string | string[], config: ResolvedConfig) {
242-
const rootPattern = glob.convertPathToPattern(config.root)
243242
return glob(pattern, {
244243
cwd: config.root,
245244
ignore: [
246-
`${rootPattern}/**/node_modules/**`,
247-
`${rootPattern}/**/${config.build.outDir}/**`,
245+
'**/node_modules/**',
246+
`**/${config.build.outDir}/**`,
248247
// if there aren't explicit entries, also ignore other common folders
249248
...(config.optimizeDeps.entries
250249
? []
251-
: [`${rootPattern}/**/__tests__/**`, `${rootPattern}/**/coverage/**`]),
250+
: [`**/__tests__/**`, `**/coverage/**`]),
252251
],
253252
absolute: true,
254253
suppressErrors: true, // suppress EACCES errors

0 commit comments

Comments
 (0)