File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1207,6 +1207,8 @@ export function getEmptyChunkReplacer(
1207
1207
)
1208
1208
}
1209
1209
1210
+ const fileURLWithWindowsDriveRE = / ^ f i l e : \/ \/ \/ [ a - z A - Z ] : \/ /
1211
+
1210
1212
interface CSSAtImportResolvers {
1211
1213
css : ResolveIdFn
1212
1214
sass : ResolveIdFn
@@ -1245,7 +1247,9 @@ function createCSSResolvers(config: ResolvedConfig): CSSAtImportResolvers {
1245
1247
args [ 1 ] = fileURLToPath ( args [ 1 ] , {
1246
1248
windows :
1247
1249
// file:///foo cannot be converted to path with windows mode
1248
- isWindows && args [ 1 ] . startsWith ( 'file:///' ) ? false : undefined ,
1250
+ isWindows && ! fileURLWithWindowsDriveRE . test ( args [ 1 ] )
1251
+ ? false
1252
+ : undefined ,
1249
1253
} )
1250
1254
}
1251
1255
return resolver ( ...args )
You can’t perform that action at this time.
0 commit comments