0.4.3 • Published 1 year ago
webpack-dep v0.4.3
webpack-dep
Using webpack get dependencies.
Installation
npm:
npm install webpack-depYarn:
yarn add webpack-depUsage
ESM:
import webpackDep from "webpack-dep";
const dependencyMap = await webpackDep({
/*
appDirectory: fs.realpathSync(process.cwd()),
excludes: undefined, // using ana-loader default excludes
webpackConfig: undefined, // using default webpack config
errorCb: undefined, // no error callback
*/
});
console.log(dependencyMap);API
webpackDep(options)
The webpackDep() function is used to get dependency map.
Parameters
options(Object) - The options object.appDirectory(string) - The app directory path. Default:fs.realpathSync(process.cwd()).excludes((string | RegExp)[]) - Exclude finding dependencies in these conditions. Default:undefinedusing ana-loader defaultexcludes.webpackConfig((config: Configuration) => Configuration) - A function receive the current webpack config and return the final webpack config. Default:undefined.errorCb((errors: StatsError[]) => void) - Error handler function. Default:undefined.