New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

chunks-report-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chunks-report-webpack-plugin

The plugin generates a report that contains all the assets of specific entrypoints

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

chunks-report-webpack-plugin npm

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:

{
    "index": {
        "js": ["vendor.js", "index.build.js"],
        "css": ["index.build.css"]
    },
    "office": {
        "js": ["vendor.js", "office.build.js"],
        "css": ["office.build.css"]
    }
}

Getting started

npm i -D chunks-report-webpack-plugin

Usage

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:

{ 
    [type: string]: RegExp 
}

Default:

{
    js: /\.js$/,
    css: /\.css$/,
}

Description:

Allows you to specify the types of assets that should be included in the report.

Keywords

webpack

FAQs

Package last updated on 08 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts