File tree 1 file changed +4
-3
lines changed
packages/vite/src/node/optimizer 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -239,15 +239,16 @@ function orderedDependencies(deps: Record<string, string>) {
239
239
}
240
240
241
241
function globEntries ( pattern : string | string [ ] , config : ResolvedConfig ) {
242
+ const rootPattern = glob . convertPathToPattern ( config . root )
242
243
return glob ( pattern , {
243
244
cwd : config . root ,
244
245
ignore : [
245
- ' **/node_modules/**' ,
246
- `**/${ config . build . outDir } /**` ,
246
+ ` ${ rootPattern } / **/node_modules/**` ,
247
+ `${ rootPattern } / **/${ config . build . outDir } /**` ,
247
248
// if there aren't explicit entries, also ignore other common folders
248
249
...( config . optimizeDeps . entries
249
250
? [ ]
250
- : [ `**/__tests__/**` , `**/coverage/**` ] ) ,
251
+ : [ `${ rootPattern } / **/__tests__/**` , `${ rootPattern } / **/coverage/**` ] ) ,
251
252
] ,
252
253
absolute : true ,
253
254
suppressErrors : true , // suppress EACCES errors
You can’t perform that action at this time.
0 commit comments