From 036018db2c3123ac1ef8dc81969476bb8bd6c0cc Mon Sep 17 00:00:00 2001 From: Michael Ciniawsky Date: Wed, 21 Feb 2018 06:05:40 +0100 Subject: [PATCH] fix(index): use `path.posix` for platform consistency --- 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); } }