https://github.com/yungvldai/chunks-report-webpack-plugin
The plugin generates a report that contains all the assets of specific entrypoints
https://github.com/yungvldai/chunks-report-webpack-plugin
chunks manifest plugin report ssr webpack
Last synced: 28 days ago
JSON representation
The plugin generates a report that contains all the assets of specific entrypoints
- Host: GitHub
- URL: https://github.com/yungvldai/chunks-report-webpack-plugin
- Owner: yungvldai
- License: mit
- Created: 2023-03-17T14:02:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-08T14:23:09.000Z (about 2 years ago)
- Last Synced: 2025-08-07T09:10:27.790Z (2 months ago)
- Topics: chunks, manifest, plugin, report, ssr, webpack
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/chunks-report-webpack-plugin
- Size: 43 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chunks-report-webpack-plugin 
- [What is it?](#what-is-it)
- [Getting started](#getting-started)
- [Usage](#usage)
- [Options](#options)
- [`outputPath`](#outputpath)
- [`exclude`](#exclude)
- [`assetTypes`](#assettypes)## What is it?
The plugin generates a report that contains all the assets of specific entrypoints.
This report can be used to render the page on the server
(to include only the necessary styles and scripts).**Report example**:
```js
{
"index": {
"js": ["vendor.js", "index.build.js"],
"css": ["index.build.css"]
},
"office": {
"js": ["vendor.js", "office.build.js"],
"css": ["office.build.css"]
}
}
```## Getting started
```console
npm i -D chunks-report-webpack-plugin
```## Usage
```js
const ChunksReportPlugin = require('chunks-report-webpack-plugin');/** @type {webpack.Configuration} */
const config = {
...
plugins: [
...
new ChunksReportPlugin({
outputPath: 'build/chunks-report.json',
exclude: [
/hot-update/
],
assetTypes: {
js: /\.js$/,
css: /\.css$/,
},
}),
...
],
...
};
```## Options
### `outputPath`
**Type**: `string`
**Default**: `'chunks-report.json'`
**Description**: Allows you to specify the path to the file that will contain the report.
### `exclude`
**Type**: `string[]`
**Default**: `[]`
**Description**: Allows you to specify patterns for files that should not be included in the report
### `assetTypes`
**Type**:
```ts
{
[type: string]: RegExp
}
```**Default**:
```js
{
js: /\.js$/,
css: /\.css$/,
}
```**Description**:
Allows you to specify the types of assets that should be included in the report.