From 24112f43f5c0a1e13b21937faa6f0581985164cc Mon Sep 17 00:00:00 2001 From: robo-mop Date: Sun, 18 Aug 2024 00:41:32 +0530 Subject: [PATCH] Use path resolve instead of posix --- lib/resolve-dirs-plugin.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/resolve-dirs-plugin.js b/lib/resolve-dirs-plugin.js index 2479c0873..815de7fa2 100644 --- a/lib/resolve-dirs-plugin.js +++ b/lib/resolve-dirs-plugin.js @@ -10,12 +10,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { posix as pathUtils, isAbsolute } from 'path'; +import { posix, isAbsolute, resolve } from 'path'; export default function resolveDirs(paths) { const pathBaseDir = paths.map((path) => [ - pathUtils.basename(path), - pathUtils.dirname(path), + posix.basename(path), + posix.dirname(path), ]); return { @@ -31,7 +31,7 @@ export default function resolveDirs(paths) { throw new Error(`Couldn't find ${'./' + id}`); } if (isAbsolute(resolveResult.id)) return resolveResult.id; - return pathUtils.resolve(resolveResult.id); + return resolve(resolveResult.id); }, }; }