mirror of https://github.com/webpack/webpack.git
parent
09862aacf8
commit
aaadeda40b
|
@ -647,7 +647,7 @@ class NormalModule extends Module {
|
||||||
resource: this.resource,
|
resource: this.resource,
|
||||||
loaders: this.loaders,
|
loaders: this.loaders,
|
||||||
context: loaderContext,
|
context: loaderContext,
|
||||||
readResource: (resource, callback) => {
|
processResource: (loaderContext, resource, callback) => {
|
||||||
const scheme = getScheme(resource);
|
const scheme = getScheme(resource);
|
||||||
if (scheme) {
|
if (scheme) {
|
||||||
hooks.readResourceForScheme
|
hooks.readResourceForScheme
|
||||||
|
@ -660,6 +660,7 @@ class NormalModule extends Module {
|
||||||
return callback(null, result);
|
return callback(null, result);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
loaderContext.addDependency(resource);
|
||||||
fs.readFile(resource, callback);
|
fs.readFile(resource, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"glob-to-regexp": "^0.4.1",
|
"glob-to-regexp": "^0.4.1",
|
||||||
"graceful-fs": "^4.2.4",
|
"graceful-fs": "^4.2.4",
|
||||||
"json-parse-better-errors": "^1.0.2",
|
"json-parse-better-errors": "^1.0.2",
|
||||||
"loader-runner": "^4.1.0",
|
"loader-runner": "^4.2.0",
|
||||||
"mime-types": "^2.1.27",
|
"mime-types": "^2.1.27",
|
||||||
"neo-async": "^2.6.2",
|
"neo-async": "^2.6.2",
|
||||||
"pkg-dir": "^5.0.0",
|
"pkg-dir": "^5.0.0",
|
||||||
|
|
|
@ -4348,10 +4348,10 @@ listr2@^3.2.2:
|
||||||
rxjs "^6.6.3"
|
rxjs "^6.6.3"
|
||||||
through "^2.3.8"
|
through "^2.3.8"
|
||||||
|
|
||||||
loader-runner@^4.1.0:
|
loader-runner@^4.2.0:
|
||||||
version "4.1.0"
|
version "4.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.1.0.tgz#f70bc0c29edbabdf2043e7ee73ccc3fe1c96b42d"
|
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384"
|
||||||
integrity sha512-oR4lB4WvwFoC70ocraKhn5nkKSs23t57h9udUgw8o0iH8hMXeEoRuUgfcvgUwAJ1ZpRqBvcou4N2SMvM1DwMrA==
|
integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==
|
||||||
|
|
||||||
loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0:
|
loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
|
|
Loading…
Reference in New Issue