Skip to content

Commit

Permalink
Merge pull request #90 from faebeee/feature/fix_windows_path
Browse files Browse the repository at this point in the history
fix: paths separator on windows
  • Loading branch information
pmowrer authored Apr 21, 2020
2 parents 7843e47 + 3a4cf4e commit 2d10a37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'lodash';
import isThere from 'is-there';
import path, {resolve, basename, extname} from 'path';
import path, { resolve, basename, extname, dirname} from 'path';

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

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

let includePaths = this.options.includePaths ? this.options.includePaths.split(path.delimiter) : [];
let paths = []
.concat(prev.slice(0, prev.lastIndexOf('/')))
.concat(dirname(prev))
.concat(includePaths);

const resolver = options.resolver || resolve;
Expand Down

0 comments on commit 2d10a37

Please sign in to comment.