Skip to content

Commit 3f0cef5

Browse files
committed
fix(rsc): fix findSourceMapURL on Windows
1 parent 604c3a2 commit 3f0cef5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/plugin-rsc/src/plugins/find-source-map-url.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
type ViteDevServer,
77
} from 'vite'
88
import fs from 'node:fs'
9+
import { slash } from './vite-utils'
910

1011
//
1112
// support findSourceMapURL
@@ -52,7 +53,7 @@ async function findSourceMapURL(
5253
): Promise<object | undefined> {
5354
// this is likely server external (i.e. outside of Vite processing)
5455
if (filename.startsWith('file://')) {
55-
filename = fileURLToPath(filename)
56+
filename = slash(fileURLToPath(filename))
5657
if (
5758
isFileLoadingAllowed(server.config, filename) &&
5859
fs.existsSync(filename)

0 commit comments

Comments
 (0)