Now, webpackConfig parameter just supports the file path which is not convenient as an object. So Why not supporting an object for webpackConfig parameter just like the tsConfig parameter?
example:
const tree = dependencyTree({
filename: `xxx/index.tsx`,
directory: `xxx/src`,
filter: (path) => path.indexOf("node_modules") === -1,
webpackConfig: {
resolve: {
extensions: [".js", ".jsx", ".tsx", ".ts"],
},
}
});