-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(plugins): add
ProfilingPlugin
documentation (#1830)
- Loading branch information
1 parent
acf7b77
commit 7b89b9f
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: ProfilingPlugin | ||
contributors: | ||
- EugeneHlushko | ||
--- | ||
|
||
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. | ||
|
||
## Options | ||
|
||
- `outputPath`: A relative path to a custom output file (json) | ||
|
||
## Usage: default | ||
|
||
``` js | ||
new webpack.debug.ProfilingPlugin() | ||
``` | ||
|
||
## Usage: custom `outputPath` | ||
|
||
``` js | ||
new webpack.debug.ProfilingPlugin({ | ||
outputPath: "profiling/profileEvents.json" | ||
}) | ||
``` | ||
|
||
In order to view the profile file: | ||
|
||
- Run webpack with `ProfilingPlugin`. | ||
- Go to Chrome, open the `Profile Tab`. | ||
- Drag and drop generated file (`events.json` by default) into the profiler. | ||
|
||
It will then display timeline stats and calls per plugin! |