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(
12071207 )
12081208}
12091209
1210+ const fileURLWithWindowsDriveRE = / ^ f i l e : \/ \/ \/ [ a - z A - Z ] : \/ /
1211+
12101212interface CSSAtImportResolvers {
12111213 css : ResolveIdFn
12121214 sass : ResolveIdFn
@@ -1245,7 +1247,9 @@ function createCSSResolvers(config: ResolvedConfig): CSSAtImportResolvers {
12451247 args [ 1 ] = fileURLToPath ( args [ 1 ] , {
12461248 windows :
12471249 // 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 ,
12491253 } )
12501254 }
12511255 return resolver ( ...args )
You can’t perform that action at this time.
0 commit comments