Skip to content

Commit 7b89b9f

Browse files
EugeneHlushkoskipjack
authored andcommitted
docs(plugins): add ProfilingPlugin documentation (#1830)
1 parent acf7b77 commit 7b89b9f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: ProfilingPlugin
3+
contributors:
4+
- EugeneHlushko
5+
---
6+
7+
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.
8+
9+
## Options
10+
11+
- `outputPath`: A relative path to a custom output file (json)
12+
13+
## Usage: default
14+
15+
``` js
16+
new webpack.debug.ProfilingPlugin()
17+
```
18+
19+
## Usage: custom `outputPath`
20+
21+
``` js
22+
new webpack.debug.ProfilingPlugin({
23+
outputPath: "profiling/profileEvents.json"
24+
})
25+
```
26+
27+
In order to view the profile file:
28+
29+
- Run webpack with `ProfilingPlugin`.
30+
- Go to Chrome, open the `Profile Tab`.
31+
- Drag and drop generated file (`events.json` by default) into the profiler.
32+
33+
It will then display timeline stats and calls per plugin!

0 commit comments

Comments
 (0)