Skip to content

Commit 30ba0f5

Browse files
Michael Hancocksapegin
Michael Hancock
authored andcommitted
Fix: Resolve path of component files (styleguidist#1305)
Closes styleguidist#1246
1 parent 1abe4c2 commit 30ba0f5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/loaders/utils/getComponentFiles.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const glob = require('glob');
2+
const path = require('path');
23
const isFunction = require('lodash/isFunction');
34
const isString = require('lodash/isString');
45

@@ -46,6 +47,9 @@ module.exports = function getComponentFiles(components, rootDir, ignore) {
4647

4748
// Resolve list of components from globs
4849
const componentFiles = getFilesMatchingGlobs(componentGlobs, rootDir, ignore);
50+
51+
// Get absolute component file paths with correct slash separator format
52+
const resolvedComponentFiles = componentFiles.map(file => path.resolve(file));
4953

50-
return componentFiles;
54+
return resolvedComponentFiles;
5155
};

0 commit comments

Comments
 (0)