You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Check out the [examples folder](/examples) for some more examples.
71
71
72
72
## Options
73
73
74
-
Options are (optionally) passed in to the constructor
74
+
Pass these into the constructor, as an object:
75
75
76
76
```javascript
77
77
constsmp=newSpeedMeasurePlugin(options);
@@ -82,7 +82,9 @@ const smp = new SpeedMeasurePlugin(options);
82
82
Type: `Boolean`<br>
83
83
Default: `false`
84
84
85
-
If truthy, this plugin does nothing at all. It is recommended to set this with something similar to `{ disable: !process.env.MEASURE }` to allow opt-in measurements with a `MEASURE=true npm run build`
85
+
If truthy, this plugin does nothing at all.
86
+
87
+
`{ disable: !process.env.MEASURE }` allows opt-in measurements with `MEASURE=true npm run build`.
86
88
87
89
### `options.outputFormat`
88
90
@@ -94,7 +96,7 @@ Determines in what format this plugin prints its measurements
94
96
*`"json"` - produces a JSON blob
95
97
*`"human"` - produces a human readable output
96
98
*`"humanVerbose"` - produces a more verbose version of the human readable output
97
-
* If a function, it will call the function with the JSON blob being the first parameter, and just the response of the function as the output
99
+
* If a function, it will call the function with the JSON blob, and output the response
If truthy, this plugin will attempt to break down the loader timing data to give per-loader timing information.
138
+
By default, SMP measures loaders in groups. If truthy, this plugin will give per-loader timing information.
137
139
138
-
Points of note that the following loaders will have inaccurate results in this mode:
140
+
This flag is _experimental_. Some loaders will have inaccurate results:
139
141
140
-
* loaders using separate processes (e.g. `thread-loader`) - these make it difficult to get timing information on the subsequent loaders, as they're not attached to the main thread
141
-
* loaders emitting file output (e.g. `file-loader`) - the time taken in outputting the actual file is not included in the running time of the loader
142
+
* loaders using separate processes (e.g. `thread-loader`)
These are restrictions from technical limitations - ideally we would find solutions to these problems before removing the _(experimental)_ flag on this options
145
+
We will find solutions to these issues before removing the _(experimental)_ flag on this option.
0 commit comments