Skip to content

Commit

Permalink
fix: add node-resolve to module-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomrdias authored and tmcw committed Oct 24, 2018
1 parent 2aa7b59 commit a033547
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"remark-reference-links": "^4.0.1",
"remark-toc": "^5.0.0",
"remote-origin-url": "0.4.0",
"resolve": "^1.8.1",
"stream-array": "^1.1.2",
"strip-json-comments": "^2.0.1",
"tiny-lr": "^1.1.0",
Expand Down Expand Up @@ -123,6 +124,7 @@
"doc": "node ./bin/documentation.js build src/index.js -f md --access=public > docs/NODE_API.md",
"self-lint": "node ./bin/documentation.js lint src",
"test": "npm run build && eslint . && flow check && jest",
"test2": "npm run build && flow check && jest",
"test-ci": "npm run build && eslint . && flow check && jest --runInBand"
},
"jest": {
Expand Down
7 changes: 6 additions & 1 deletion src/input/dependency.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ function dependencyStream(
]
})
],
postFilter: moduleFilters.externals(indexes, config)
postFilter: moduleFilters.externals(indexes, config),
resolve: (id, opts, cb) => {
const r = require('resolve');
opts.basedir = path.dirname(opts.filename);
r(id, opts, cb);
}
});
smartGlob(indexes, config.parseExtension).forEach(index => {
md.write(path.resolve(index));
Expand Down

0 comments on commit a033547

Please sign in to comment.