|
|
@ -9,10 +9,10 @@ class CustomResolver {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
apply(resolver) {
|
|
|
|
apply(resolver) {
|
|
|
|
const target = resolver.ensureHook(this.target);
|
|
|
|
const target = resolver.ensureHook(this.target);
|
|
|
|
resolver
|
|
|
|
resolver
|
|
|
|
.getHook(this.source)
|
|
|
|
.getHook(this.source)
|
|
|
|
.tapAsync("CustomResolver", (request, resolveContext, callback) => {
|
|
|
|
.tapAsync("CustomResolver", (request, resolveContext, callback) => {
|
|
|
|
|
|
|
|
|
|
|
|
// request.request is the string path we're resolving
|
|
|
|
// request.request is the string path we're resolving
|
|
|
|
// match ~/[dir]/[path]
|
|
|
|
// match ~/[dir]/[path]
|
|
|
@ -56,8 +56,8 @@ class CustomResolver {
|
|
|
|
request: selectedPath
|
|
|
|
request: selectedPath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
resolver.doResolve(target, newRequest, null, resolveContext, callback);
|
|
|
|
resolver.doResolve(target, newRequest, null, resolveContext, callback);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|