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
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,13 @@ Options are (optionally) passed in to the constructor
63
63
constsmp=newSpeedMeasurePlugin(options);
64
64
```
65
65
66
+
### `options.disable`
67
+
68
+
Type: `Boolean`<br>
69
+
Default: `false`
70
+
71
+
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`
72
+
66
73
### `options.outputFormat`
67
74
68
75
Type: `String|Function`<br>
@@ -83,12 +90,29 @@ Default: `console.log`
83
90
* If a string, it specifies the path to a file to output to.
84
91
* If a function, it will call the function with the output as the first parameter
85
92
86
-
### `options.disable`
93
+
### `options.pluginNames`
87
94
88
-
Type: `Boolean`<br>
89
-
Default: `false`
95
+
Type: `Object`<br>
96
+
Default: `{}`
90
97
91
-
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`
98
+
By default, SMP derives plugin names through `plugin.constructor.name`. For some
99
+
plugins this doesn't work (or you may want to override this default). This option
100
+
takes an object of `pluginName: PluginConstructor`, e.g.
0 commit comments