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

fix(index): use path.posix for platform consistency #254

Merged
merged 1 commit into from Feb 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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