Skip to content

Commit 409fa5c

Browse files
authored
fix: handle warmup glob hang (#18462)
1 parent 993e71c commit 409fa5c

File tree

5 files changed

+30
-16
lines changed

5 files changed

+30
-16
lines changed

packages/vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"source-map-support": "^0.5.21",
149149
"strip-ansi": "^7.1.0",
150150
"strip-literal": "^2.1.0",
151-
"tinyglobby": "^0.2.9",
151+
"tinyglobby": "^0.2.10",
152152
"tsconfck": "^3.1.4",
153153
"tslib": "^2.8.0",
154154
"types": "link:./types",

packages/vite/src/node/server/warmup.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ function fileToUrl(file: string, root: string) {
7070
return '/' + normalizePath(url)
7171
}
7272

73-
function mapFiles(files: string[], root: string) {
74-
return glob(files, {
73+
async function mapFiles(files: string[], root: string) {
74+
if (!files.length) return []
75+
return await glob(files, {
7576
absolute: true,
7677
cwd: root,
7778
expandDirectories: false,
79+
ignore: ['**/.git/**', '**/node_modules/**'],
7880
})
7981
}

playground/backend-integration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
"devDependencies": {
1313
"sass": "^1.80.3",
1414
"tailwindcss": "^3.4.14",
15-
"tinyglobby": "^0.2.9"
15+
"tinyglobby": "^0.2.10"
1616
}
1717
}

playground/css/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"sass": "^1.80.3",
2727
"stylus": "^0.64.0",
2828
"sugarss": "^4.0.1",
29-
"tinyglobby": "^0.2.9"
29+
"tinyglobby": "^0.2.10"
3030
},
3131
"imports": {
3232
"#imports": "./imports-field.css"

pnpm-lock.yaml

Lines changed: 23 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)