jantimon / cpuprofile-webpack-plugin

Generate a cpuprofile for your webpack builds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cpuprofile-webpack-plugin

Generate a cpuprofile for your webpack builds
The profile can be imported into GoogleChrome Dev Tools.

In addition a flame graph representation is generated: Flame Graph Example

⚠️ Warning ⚠️

This library is a work in progress, use at your own risk. But feel free to help out where you see bugs or incomplete things!

Usage

cli

webpack --plugin cpuprofile-webpack-plugin

dev-server

webpack-dev-server --plugin cpuprofile-webpack-plugin

webpack.config.js

const CpuProfilerWebpackPlugin = require('cpuprofile-webpack-plugin');

module.exports = {
  plugins: [
    new CpuProfilerWebpackPlugin()
  ]
}

Example

Example Profile (6MB)

About

Generate a cpuprofile for your webpack builds


Languages

Language:TypeScript 80.1%Language:JavaScript 14.5%Language:HTML 3.5%Language:CSS 1.9%