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

https://github.com/wayou/print-chunks-plugin

webpack plugin to print chunks for bundle
https://github.com/wayou/print-chunks-plugin

debug print webpack webpack-plugin

Last synced: 5 days ago
JSON representation

webpack plugin to print chunks for bundle

Awesome Lists containing this project

README

          

# print-chunks-plugin

[![npm package](https://img.shields.io/npm/v/print-chunks-plugin.svg)](https://www.npmjs.com/package/print-chunks-plugin)
[![npm package](https://img.shields.io/npm/dm/print-chunks-plugin.svg)](https://www.npmjs.com/package/print-chunks-plugin)

Outputs exactly what went into each chunk

The code is taken from the [webpack documentation](https://github.com/webpack/docs/wiki/plugins#after-optimize-chunk-assetschunks-chunk)

I find this so useful for debugging. But there's no package in the npm.

### install

```
npm i -D print-chunks-plugin
```

### usage

```js
var PrintChunksPlugin = require("print-chunks-plugin");
var webpackConfig = {
entry: "index.js",
output: {
path: __dirname + "/dist",
filename: "index_bundle.js",
},
plugins: [new PrintChunksPlugin()],
// or with option:
plugins: [new PrintChunksPlugin({ showFull: true })],
};
```

### Options

- `showFull`: stringify the result to get rid of the 100 array output limit of `console.log`, [learn more](https://stackoverflow.com/questions/41669039/dumping-whole-array-console-log-and-console-dir-output-num-more-items)
- type: `bool`
- default: `false`