ProfilingPlugin
Generate Chrome profile file which includes timings of plugins execution. Outputs events.json
file by default. It is possible to provide custom file path using outputPath
option.
Note : ProfilingPlugin accepts only absolute paths.
Options
-
outputPath
: An absolute path to a custom output file (json)
Usage: default
new webpack.debug.ProfilingPlugin();
Usage: custom outputPath
new webpack.debug.ProfilingPlugin({ outputPath: path.join(__dirname, 'profiling/profileEvents.json'), });
In order to view the profile file:
- Run webpack with
ProfilingPlugin
. - Go to Chrome, open DevTools, and go to the
Performance
tab (formerlyTimeline
). - Drag and drop generated file (
events.json
by default) into the profiler.
It will then display timeline stats and calls per plugin!
© JS Foundation and other contributors
Licensed under the Creative Commons Attribution License 4.0.
https://webpack.js.org/plugins/profiling-plugin