0.4.3 • Published 4 days ago

webpack-dep v0.4.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

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.

Release Notes

0.4.3

4 days ago

0.4.2

4 days ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago