Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mquy/webpack-compiling-stats-plugin

Webpack plugin to output compiling stats
https://github.com/mquy/webpack-compiling-stats-plugin

compiling metrics stats time webpack webpack-plugin

Last synced: about 2 months ago
JSON representation

Webpack plugin to output compiling stats

Awesome Lists containing this project

README

        

## Webpack Compiling Stats Plugin

Webpack plugin to output compiling stats

[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![licenses][licenses]][licenses-url]

### Installation

Via npm:

```bash
$ npm install webpack-compiling-stats-plugin --save-dev
```

Via yarn:

```bash
$ yarn add -D webpack-compiling-stats-plugin
```

![output](https://i.imgur.com/YY4DPUF.png)

### Usage

```js
const CompilingStatsPlugin = require('webpack-compiling-stats-plugin');

const webpackConfig = {
...
plugins: [
new CompilingStatsPlugin()
]
}
```

✍️ when using `thread-loader`, all the same file types have to be placed in the same rule.

```js
rules: [
{
test: /\.(js|jsx)$/,
loader: "eslint-loader",
enforce: "pre"
},
{
test: /\.(js|jsx)$/,
use: ["thread-loader", "babel-loader"]
}
];

->

rules: [
{
test: /\.(js|jsx)$/,
use: ["thread-loader", "babel-loader", "eslint-loader"]
}
];

```

### Configuration

```js
new CompilingStatsPlugin(options);
```

#### ignoredPlugins (default: `[native webpack plugins]`)

List of webpack plugins are ignored when analyzing/logging

#### threadhold (default: `0`)

The minimum time is accepted when logging

#### log

The function logs stats

[npm]: https://img.shields.io/npm/v/webpack-compiling-stats-plugin.svg
[npm-url]: https://npmjs.com/package/webpack-compiling-stats-plugin
[node]: https://img.shields.io/node/v/webpack-compiling-stats-plugin.svg
[node-url]: https://nodejs.org
[deps]: https://img.shields.io/david/MQuy/webpack-compiling-stats-plugin.svg
[deps-url]: https://david-dm.org/MQuy/webpack-compiling-stats-plugin
[licenses]: https://img.shields.io/github/license/MQuy/webpack-compiling-stats-plugin.svg
[licenses-url]: https://github.com/MQuy/webpack-compiling-stats-plugin/blob/master/LICENSE