Skip to content

Commit a033547

Browse files
hugomrdiastmcw
authored andcommitted
fix: add node-resolve to module-deps
1 parent 2aa7b59 commit a033547

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"remark-reference-links": "^4.0.1",
6060
"remark-toc": "^5.0.0",
6161
"remote-origin-url": "0.4.0",
62+
"resolve": "^1.8.1",
6263
"stream-array": "^1.1.2",
6364
"strip-json-comments": "^2.0.1",
6465
"tiny-lr": "^1.1.0",
@@ -123,6 +124,7 @@
123124
"doc": "node ./bin/documentation.js build src/index.js -f md --access=public > docs/NODE_API.md",
124125
"self-lint": "node ./bin/documentation.js lint src",
125126
"test": "npm run build && eslint . && flow check && jest",
127+
"test2": "npm run build && flow check && jest",
126128
"test-ci": "npm run build && eslint . && flow check && jest --runInBand"
127129
},
128130
"jest": {

src/input/dependency.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ function dependencyStream(
7070
]
7171
})
7272
],
73-
postFilter: moduleFilters.externals(indexes, config)
73+
postFilter: moduleFilters.externals(indexes, config),
74+
resolve: (id, opts, cb) => {
75+
const r = require('resolve');
76+
opts.basedir = path.dirname(opts.filename);
77+
r(id, opts, cb);
78+
}
7479
});
7580
smartGlob(indexes, config.parseExtension).forEach(index => {
7681
md.write(path.resolve(index));

0 commit comments

Comments
 (0)