Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
fix(index): use path.posix for platform consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky committed Feb 21, 2018
1 parent 54fa5a3 commit 036018d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.js
Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}

Expand Down

0 comments on commit 036018d

Please sign in to comment.