diff --git a/NOTICE b/NOTICE index 6226bc34ab..3160d03559 100644 --- a/NOTICE +++ b/NOTICE @@ -43,6 +43,7 @@ under the licensing terms detailed in LICENSE: * Joe Pea * Felipe Gasper * Congcong Cai <77575210+HerrCai0907@users.noreply.github.com> +* mooooooi Portions of this software are derived from third-party works licensed under the following terms: diff --git a/cli/util/options.js b/cli/util/options.js index ee23563de9..c4159fec27 100644 --- a/cli/util/options.js +++ b/cli/util/options.js @@ -237,6 +237,16 @@ function merge(config, currentOptions, parentOptions, parentBaseDir) { exports.merge = merge; +function normalizePath(p) { + const parsed = path.parse(p); + if (!parsed.root) { + parsed.root = "./"; + } + return path.format(parsed); +} + +exports.normalizePath = normalizePath; + const dynrequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require; @@ -247,7 +257,7 @@ function resolvePath(p, baseDir, useNodeResolution = false) { if (useNodeResolution && !p.startsWith(".")) { return dynrequire.resolve(p, { paths: [ baseDir ] }); } - return path.join(baseDir, p); + return normalizePath(path.join(baseDir, p)); } exports.resolvePath = resolvePath;