We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8e2689 commit ac87924Copy full SHA for ac87924
1 file changed
src/index.js
@@ -1,4 +1,5 @@
1
import path from 'path';
2
+import fs from 'fs';
3
import glob from 'glob';
4
import findBabelConfig from 'find-babel-config';
5
import getRealPath from './getRealPath';
@@ -28,7 +29,9 @@ export function manipulatePluginOptions(pluginOpts) {
28
29
// eslint-disable-next-line no-param-reassign
30
pluginOpts.root = pluginOpts.root.reduce((resolvedDirs, dirPath) => {
31
if (glob.hasMagic(dirPath)) {
- return resolvedDirs.concat(glob.sync(dirPath));
32
+ return resolvedDirs.concat(
33
+ glob.sync(dirPath).filter(p => fs.lstatSync(p).isDirectory()),
34
+ );
35
}
36
return resolvedDirs.concat(dirPath);
37
}, []);
0 commit comments