perf-hints-plugin

Provide performance hints in webpack output

MIT License

Downloads
16
Stars
6
Committers
1

perf-hints-plugin

DEPRECATED ❌❌ - Please use the webpack performance feature

Webpack plugin that provides hints for Performance.

Attempt at providing warnings and errors while bundling JS/CSS in Webpack. Inspired from this RFC.

Features

  • Monolithic bundle size warnings. monolith

  • Code splitted bundles exceed given max size. code-split

Install

npm i --save-dev perf-hints-plugin
yarn add -D perf-hints-plugin

Usage

// webpack.config.js
const PerfHintsPlugin = require("perf-hints-plugin");
module.exports = {
  entry: //...,
  output: //...,
  plugins: [
    new PerfHintsPlugin({
        hints: true,
        maxBundleSize: 200 // kB
    })
  ]
}

Options

  • hints - Flag to Enable/Disable hints in the console. Default is false
  • maxBundleSize - for setting the performance budget. Expressed in kiloBytes. Default value is 250kB