An open API service indexing awesome lists of open source software.

https://github.com/freemenl/empty-webpack-build-detail-plugin

friendly display compilation details
https://github.com/freemenl/empty-webpack-build-detail-plugin

chalk filesize fs-extra gzip-size recursive-readdir strip-ansi tapable

Last synced: about 1 year ago
JSON representation

friendly display compilation details

Awesome Lists containing this project

README

          





empty-webpack-build-detail-plugin


friendly display compilation details


Install

```bash
cnpm install empty-webpack-build-detail-plugin -D
```

```bash
npm i empty-webpack-build-detail-plugin -D
```

```bash
yarn add --dev empty-webpack-build-detail-plugin
```

This is a [webpack](http://webpack.js.org/) plugin tailored for [emptyd-desgin](https://github.com/FreemenL/emptyd-admin-webpack) and can be used in your project. No difference

Zero Config

The `empty-webpack-build-detail-plugin` works without configuration.

Usage

The plugin will friendly display compilation details

**webpack.config.prod.js**
```javascript
const emptyWebpackBuildDetailPlugin = require("empty-webpack-build-detail-plugin");

module.exports = {
-entry: 'index.js',
-output: {
-path: __dirname + '/dist',
-filename: 'index_bundle.js'
-},
plugins: [
new emptyWebpackBuildDetailPlugin(options)
]
}

```

Options

You can pass a hash of configuration options to `empty-webpack-build-detail-plugin`.
Allowed values are as follows

|Name|Type|Default|Description|
|:--:|:--:|:-----:|:----------|
|**`path`**|`{String}`|`compilation.options.context`|The path to use for the compile log|
|**`filename`**|`{String}`|`'compilation-detail.md'`|The file to write the compile log to. Defaults to `compilation-detail.md`|
|**`warnAfterBundleGzipSize`**|`{number}`|512*1024 (Bit)|Maximum limit for bundle files|
|**`warnAfterChunkGzipSize`**|`{number}`|1024*1024 (Bit)|Maximum limit for chunk files|

Here's an example webpack config illustrating how to use these options

**webpack.config.js**
```js
{
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new emptyWebpackBuildDetailPlugin({
path: path.join(process.cwd(),'log'),
filename: 'compile-log.md'
})
]
}
```

Maintainers






freemenL