We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
file:
1 parent 5303db2 commit 5604205Copy full SHA for 5604205
src/utils.js
@@ -2,6 +2,7 @@
2
MIT License http://www.opensource.org/licenses/mit-license.php
3
Author Tobias Koppers @sokra
4
*/
5
+import { fileURLToPath } from 'url';
6
import path from 'path';
7
8
import { urlToRequest, interpolateName, isUrlRequest } from 'loader-utils';
@@ -82,6 +83,10 @@ function normalizeUrl(url, isStringValue) {
82
83
}
84
85
function requestify(url, rootContext) {
86
+ if (/^file:/i.test(url)) {
87
+ return fileURLToPath(url);
88
+ }
89
+
90
return mayBeServerRelativeUrl(url)
91
? urlToRequest(url, rootContext)
92
: urlToRequest(url);
@@ -521,6 +526,10 @@ function isUrlRequestable(url) {
521
526
return true;
522
527
523
528
529
530
+ return true;
531
532
524
533
return isUrlRequest(url);
525
534
535
0 commit comments