Skip to content

Commit 3a4cf4e

Browse files
committed
fix: paths separator on windows
1 parent 7843e47 commit 3a4cf4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import _ from 'lodash';
22
import isThere from 'is-there';
3-
import path, {resolve, basename, extname} from 'path';
3+
import path, { resolve, basename, extname, dirname} from 'path';
44

55
import 'json5/lib/register'; // Enable JSON5 support
66

@@ -12,7 +12,7 @@ export default function(options = {}) {
1212

1313
let includePaths = this.options.includePaths ? this.options.includePaths.split(path.delimiter) : [];
1414
let paths = []
15-
.concat(prev.slice(0, prev.lastIndexOf('/')))
15+
.concat(dirname(prev))
1616
.concat(includePaths);
1717

1818
const resolver = options.resolver || resolve;

0 commit comments

Comments
 (0)