webpack-tree-dependency
v1.1.0
Published
A Webpack plugin that creates a dependency tree (JSON or HTML)
Maintainers
Readme
Webpack dependency tree
This a webpack plugin that creates a dependency tree (JSON or HTML)
Install
npm install --save-dev webpack-tree-dependencyUsage
webpack.dev.config.js
var TreeWebpackPlugin = require('webpack-tree-dependency');
module.exports = {
plugins: [new TreeWebpackPlugin()]
};After starting the dev server you will be able to find the output file at:
localhost:port/filename.html (or .json)
Options
|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|directory|{String}| 'src'|path to src folder from project root|
|extensions|{Array<String>}|['js']|Files to include|
|filename|{String}|'tree'|output filename|
|emitHtml|{Boolean}|true|emit HTML or JSON|
new TreeWebpackPlugin({
directory: 'path/to/folder',
extensions: ['js', 'html'],
filename: 'map',
emitHtml: true
})
