Skip to content

Commit

Permalink
fix(streaming): Fix css loading on dev server on Windows (#9557)
Browse files Browse the repository at this point in the history
  • Loading branch information
dac09 authored Nov 21, 2023
1 parent a70b0e3 commit 205e0f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/streaming/collectCss.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ViteDevServer, ModuleNode } from 'vite'
import { normalizePath } from 'vite'

/**
* Collect SSR CSS for Vite
Expand All @@ -9,7 +10,7 @@ export const componentsModules = (
) => {
const matchedModules: Set<ModuleNode> = new Set()
components.forEach((component) => {
const modules = vite.moduleGraph.getModulesByFile(component)
const modules = vite.moduleGraph.getModulesByFile(normalizePath(component))
modules?.forEach((mod) => {
matchedModules.add(mod)
})
Expand Down

0 comments on commit 205e0f4

Please sign in to comment.