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
## **`unique(<field>, <fields>, field => field)`**
146
+
147
+
`unique` is a strategy used for forcing uniqueness within configuration. It's most useful with plugins when you want to make sure there's only one in place.
148
+
149
+
The first `<field>` is the config property to look through for duplicates.
150
+
151
+
`<fields>` represents the values that should be unique when you run the field => field function on each duplicate.
// Output contains only single HotModuleReplacementPlugin now and it's
172
+
// going to be the last plugin instance.
173
+
```
174
+
145
175
## **`mergeWithRules`**
146
176
147
177
To support advanced merging needs (i.e. merging within loaders), `mergeWithRules` includes additional syntax that allows you to match fields and apply strategies to match. Consider the full example below:
@@ -211,36 +241,6 @@ assert.deepStrictEqual(
211
241
212
242
The way it works is that you should annotate fields to match using `match` (or `CustomizeRule.Match` if you are using TypeScript) matching your configuration structure and then use specific strategies to define how particular fields should be transformed.
213
243
214
-
## **`unique(<field>, <fields>, field => field)`**
215
-
216
-
`unique` is a strategy used for forcing uniqueness within configuration. It's most useful with plugins when you want to make sure there's only one in place.
217
-
218
-
The first `<field>` is the config property to look through for duplicates.
219
-
220
-
`<fields>` represents the values that should be unique when you run the field => field function on each duplicate.
0 commit comments