0.0.5 • Published 9 years ago
perf-hints-plugin v0.0.5
perf-hints-plugin
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.

Code splitted bundles exceed given max size.

Install
npm i --save-dev perf-hints-pluginyarn add -D perf-hints-pluginUsage
// 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 isfalsemaxBundleSize- for setting the performance budget. Expressed in kiloBytes. Default value is250kB