From 2afe0afe9735f94df0d32bce29c90ebf630fb646 Mon Sep 17 00:00:00 2001 From: Michael Ciniawsky Date: Wed, 21 Feb 2018 20:11:24 +0100 Subject: [PATCH] fix(index): use `path.posix` for platform consistency (#254) --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 6b430cb..0e144fe 100644 --- a/src/index.js +++ b/src/index.js @@ -24,7 +24,7 @@ export default function loader(content) { if (typeof options.outputPath === 'function') { outputPath = options.outputPath(url); } else { - outputPath = path.join(options.outputPath, url); + outputPath = path.posix.join(options.outputPath, url); } } @@ -44,9 +44,9 @@ export default function loader(content) { const relativePath = relativeUrl && `${path.dirname(relativeUrl)}/`; // eslint-disable-next-line no-bitwise if (~relativePath.indexOf('../')) { - outputPath = path.join(outputPath, relativePath, url); + outputPath = path.posix.join(outputPath, relativePath, url); } else { - outputPath = path.join(relativePath, url); + outputPath = path.posix.join(relativePath, url); } }