webpack-get-dlls
Get DLL configs from a webpack config
Install
npm install webpack-get-dlls --save
Or, install globally for CLI:
npm install -g webpack-get-dlls
API
getDlls(webpackConfig : Object) : Object
Get all DLL configuration objects referenced in the given webpackConfig
.
- webpackConfig {Object} (required) The webpack configuration
Returns an object with dlls
and errors
properties.
For each DLL that could not be found a record will be in errors
.
Error types are at getDlls.ERRORS
.
Example:
const webpackConfig = const getDlls = const dlls errors = if errors console //=> [{ // error: 'DLL_NOT_FOUND', // position: 0, // zero-indexed plugin position // path: './vendor.webpack.config.js', // only present for DLL_NOT_FOUND // }] console //=> [{ // name: 'dll.webpack.config.js',// config: ... // the DLL configuration object // }]
CLI
Outputs the name of each DLL on its own line.
Available as webpack-get-dlls
or wpk-get-dlls
.
Example:
$ webpack-get-dlls ./webpack.config.jsdll1.webpack.config.jsdll2.webpack.config.js
Contributing
All pull requests and issues welcome!
If you're not sure how, check out the great video tutorials on egghead.io!
License
MIT © Sam Gluck