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 22 MIT License http://www.opensource.org/licenses/mit-license.php
33 Author Tobias Koppers @sokra
44*/
5+ import { fileURLToPath } from 'url' ;
56import path from 'path' ;
67
78import { urlToRequest , interpolateName , isUrlRequest } from 'loader-utils' ;
@@ -82,6 +83,10 @@ function normalizeUrl(url, isStringValue) {
8283}
8384
8485function requestify ( url , rootContext ) {
86+ if ( / ^ f i l e : / i. test ( url ) ) {
87+ return fileURLToPath ( url ) ;
88+ }
89+
8590 return mayBeServerRelativeUrl ( url )
8691 ? urlToRequest ( url , rootContext )
8792 : urlToRequest ( url ) ;
@@ -521,6 +526,10 @@ function isUrlRequestable(url) {
521526 return true ;
522527 }
523528
529+ if ( / ^ f i l e : / i. test ( url ) ) {
530+ return true ;
531+ }
532+
524533 return isUrlRequest ( url ) ;
525534}
526535
You can’t perform that action at this time.
0 commit comments