Skip to content

Commit

Permalink
fix: normalize literal-only entry pattern (#16010)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Feb 28, 2024
1 parent 7cfe80d commit 1dccc37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/node/optimizer/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ function orderedDependencies(deps: Record<string, string>) {
function globEntries(pattern: string | string[], config: ResolvedConfig) {
const resolvedPatterns = arraify(pattern)
if (resolvedPatterns.every((str) => !glob.isDynamicPattern(str))) {
return resolvedPatterns.map((p) => path.resolve(config.root, p))
return resolvedPatterns.map((p) =>
normalizePath(path.resolve(config.root, p)),
)
}
return glob(pattern, {
cwd: config.root,
Expand Down

0 comments on commit 1dccc37

Please sign in to comment.