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

Commit 2afe0af

Browse files
authoredFeb 21, 2018
fix(index): use path.posix for platform consistency (#254)
1 parent 54fa5a3 commit 2afe0af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function loader(content) {
2424
if (typeof options.outputPath === 'function') {
2525
outputPath = options.outputPath(url);
2626
} else {
27-
outputPath = path.join(options.outputPath, url);
27+
outputPath = path.posix.join(options.outputPath, url);
2828
}
2929
}
3030

@@ -44,9 +44,9 @@ export default function loader(content) {
4444
const relativePath = relativeUrl && `${path.dirname(relativeUrl)}/`;
4545
// eslint-disable-next-line no-bitwise
4646
if (~relativePath.indexOf('../')) {
47-
outputPath = path.join(outputPath, relativePath, url);
47+
outputPath = path.posix.join(outputPath, relativePath, url);
4848
} else {
49-
outputPath = path.join(relativePath, url);
49+
outputPath = path.posix.join(relativePath, url);
5050
}
5151
}
5252

0 commit comments

Comments
 (0)
This repository has been archived.