webpack-dep
TypeScript icon, indicating that this package has built-in type declarations

0.4.3 • Public • Published

npm version codecov

webpack-dep

Using webpack get dependencies.

Installation

npm:

npm install webpack-dep

Yarn:

yarn add webpack-dep

Usage

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: undefined using ana-loader default excludes.
    • 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.

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-dep

Weekly Downloads

22

Version

0.4.3

License

MIT

Unpacked Size

67.8 kB

Total Files

41

Last publish

Collaborators

  • zjffun