Skip to content

Commit 65f525e

Browse files
authored
fix(glob): respect caseSensitive option in hmr matcher (#22711)
1 parent 61ba8fd commit 65f525e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/vite/src/node/plugins/importMetaGlob.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,13 @@ export function importGlobPlugin(config: ResolvedConfig): Plugin {
8686
const affirmedMatcher = picomatch(affirmed, {
8787
noextglob: true,
8888
dot: !!i.options.exhaustive,
89+
nocase: !(i.options.caseSensitive ?? true),
8990
ignore: i.options.exhaustive ? [] : ['**/node_modules/**'],
9091
})
9192
const negatedMatcher = picomatch(negated, {
9293
noextglob: true,
9394
dot: !!i.options.exhaustive,
95+
nocase: !(i.options.caseSensitive ?? true),
9496
ignore: i.options.exhaustive ? [] : ['**/node_modules/**'],
9597
})
9698

0 commit comments

Comments
 (0)