Use unified path separator
This commit is contained in:
parent
ab59263662
commit
c6ac157ba3
|
@ -38,9 +38,7 @@ class RequestShortener {
|
|||
? dirname.substr(0, dirname.length - 1)
|
||||
: dirname;
|
||||
if (parentDirectory && parentDirectory !== directory) {
|
||||
this.parentDirectoryRegExp = createRegExpForPath(
|
||||
`${parentDirectory}${path.sep}`
|
||||
);
|
||||
this.parentDirectoryRegExp = createRegExpForPath(`${parentDirectory}/`);
|
||||
}
|
||||
|
||||
if (__dirname.length >= 2) {
|
||||
|
@ -69,7 +67,7 @@ class RequestShortener {
|
|||
result = result.replace(this.currentDirectoryRegExp, "!.");
|
||||
}
|
||||
if (this.parentDirectoryRegExp) {
|
||||
result = result.replace(this.parentDirectoryRegExp, `!..${path.sep}`);
|
||||
result = result.replace(this.parentDirectoryRegExp, `!../`);
|
||||
}
|
||||
if (!this.buildinsAsModule && this.buildinsRegExp) {
|
||||
result = result.replace(this.buildinsRegExp, "!(webpack)");
|
||||
|
|
Loading…
Reference in New Issue