File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 2
2
MIT License http://www.opensource.org/licenses/mit-license.php
3
3
Author Tobias Koppers @sokra
4
4
*/
5
+ import { fileURLToPath } from 'url' ;
5
6
import path from 'path' ;
6
7
7
8
import { urlToRequest , interpolateName , isUrlRequest } from 'loader-utils' ;
@@ -82,6 +83,10 @@ function normalizeUrl(url, isStringValue) {
82
83
}
83
84
84
85
function requestify ( url , rootContext ) {
86
+ if ( / ^ f i l e : / i. test ( url ) ) {
87
+ return fileURLToPath ( url ) ;
88
+ }
89
+
85
90
return mayBeServerRelativeUrl ( url )
86
91
? urlToRequest ( url , rootContext )
87
92
: urlToRequest ( url ) ;
@@ -521,6 +526,10 @@ function isUrlRequestable(url) {
521
526
return true ;
522
527
}
523
528
529
+ if ( / ^ f i l e : / i. test ( url ) ) {
530
+ return true ;
531
+ }
532
+
524
533
return isUrlRequest ( url ) ;
525
534
}
526
535
You can’t perform that action at this time.
0 commit comments