1 | # Changelog
|
---|
2 |
|
---|
3 | ## 5.8.0 / 2021-06-07
|
---|
4 |
|
---|
5 | - Docs - Update `env` example to be webpack 5 compatible. #177, #180
|
---|
6 | - Feat - Support strings as rules for TypeScript, not just enums. #179, #185
|
---|
7 |
|
---|
8 | ## 5.7.3 / 2020-12-22
|
---|
9 |
|
---|
10 | - Fix - Don't merge strings with objects in `mergeWithRules`. #172
|
---|
11 |
|
---|
12 | ## 5.7.2 / 2020-12-16
|
---|
13 |
|
---|
14 | - Fix - If there's no match when using `merge` operation with `mergeWithRules`, use default merge behavior as a fallback. #167
|
---|
15 |
|
---|
16 | ## 5.7.1 / 2020-12-16
|
---|
17 |
|
---|
18 | - Fix - Fix a merge failure for `mergeWithRules` when non-array matches are merged. #166
|
---|
19 |
|
---|
20 | ## 5.7.0 / 2020-12-12
|
---|
21 |
|
---|
22 | - Feat - Throw a `TypeError` if trying to use `mergeWithRules` with invalid configuration types for `append`/`prepend`/`merge` operations.
|
---|
23 |
|
---|
24 | ## 5.6.1 / 2020-12-11
|
---|
25 |
|
---|
26 | - Fix - Drop extraneous logging.
|
---|
27 |
|
---|
28 | ## 5.6.0 / 2020-12-11
|
---|
29 |
|
---|
30 | - Feat - Support `merge` (`CustomizeRule.Merge`) for objects at `mergeWithRules`. This is useful for merging loader options for example. #163
|
---|
31 |
|
---|
32 | ## 5.5.0 / 2020-12-10
|
---|
33 |
|
---|
34 | - Feat - Allow `mergeWithRules` to merge based on rules without a match. #151 #159
|
---|
35 |
|
---|
36 | ## 5.4.1 / 2020-12-08
|
---|
37 |
|
---|
38 | - Fix - Allow `mergeUnique` to work with arbitrary order. #161
|
---|
39 |
|
---|
40 | ## 5.4.0 / 2020-10-30
|
---|
41 |
|
---|
42 | - Fix - Fall back correctly in `mergeWithRules` for cases that aren't matched. #157 #158
|
---|
43 | - Fix - Don't throw if using `mergeWithRules` without a rule #151
|
---|
44 | - Feat - Throw if `undefined` is passed to `merge` as a structure to merge
|
---|
45 |
|
---|
46 | ## 5.3.0 / 2020-10-30
|
---|
47 |
|
---|
48 | - Fix - Expose `Configuration` type through a generic to TypeScript to support both webpack 4 and 5 #141 #154
|
---|
49 |
|
---|
50 | In case you use webpack 4, please change your typing as instructed in the readme as the default type is loose but non-breaking.
|
---|
51 |
|
---|
52 | ## 5.2.0 / 2020-10-07
|
---|
53 |
|
---|
54 | - Feature - Support advanced merging cases through `mergeWithRules` #146 #149
|
---|
55 |
|
---|
56 | ## 5.1.4 / 2020-09-09
|
---|
57 |
|
---|
58 | - Fix - Expose `CustomizeRule` for TypeScript users #147
|
---|
59 |
|
---|
60 | ## 5.1.3 / 2020-08-30
|
---|
61 |
|
---|
62 | - Fix - Allow merging a `RegExp` to itself #145
|
---|
63 |
|
---|
64 | ## 5.1.2 / 2020-08-18
|
---|
65 |
|
---|
66 | - Fix - Allow overriding an object field with `null` #144
|
---|
67 |
|
---|
68 | ## 5.1.1 / 2020-08-04
|
---|
69 |
|
---|
70 | - Fix - Drop `<reference types="webpack-dev-server" />` from **index.d.ts** #143
|
---|
71 |
|
---|
72 | ## 5.1.0 / 2020-08-03
|
---|
73 |
|
---|
74 | - Feature - Expose `merge` as `default` for backwards-compatibility with TypeScript. Now `import merge from "webpack-merge";` works there. In CommonJS, the default alias is exposed through `default` property due to technical constraints.
|
---|
75 |
|
---|
76 | ## 5.0.9 / 2020-07-09
|
---|
77 |
|
---|
78 | - Fix - Don't crash on `merge()` and `merge([])`. Now `{}` is returned in these corner cases.
|
---|
79 |
|
---|
80 | ## 5.0.8 / 2020-07-07
|
---|
81 |
|
---|
82 | - Fix - Support Node 10 #138
|
---|
83 |
|
---|
84 | ## 5.0.7 / 2020-07-06
|
---|
85 |
|
---|
86 | - Fix - Drop tslib dependency by setting `"importHelpers": false,`
|
---|
87 |
|
---|
88 | ## 5.0.6 / 2020-07-06
|
---|
89 |
|
---|
90 | - Fix - Add tslib to dependencies
|
---|
91 |
|
---|
92 | ## 5.0.5 / 2020-07-06
|
---|
93 |
|
---|
94 | - Tech - Optimize build size (UMD isn't needed)
|
---|
95 |
|
---|
96 | ## 5.0.4 / 2020-07-06
|
---|
97 |
|
---|
98 | - Documentation - Use CommonJS imports at the examples. #137
|
---|
99 |
|
---|
100 | ## 5.0.3 / 2020-07-06
|
---|
101 |
|
---|
102 | - Feature - Support TypeScript out of the box. #84 #86 #95 #110 #112
|
---|
103 | - Deprecation - `merge.smart` has been dropped as it's tricky to support all the corner cases. Instead, it's better to use the provided utilities to put together a `merge` that fits your case.
|
---|
104 | - Deprecation - `mergeStrategy` has been dropped in favor of using `mergeWithCustomize` with `customizeArray` and `customizeObject`.
|
---|
105 | - Deprecation - `merge.multiple` has been dropped as the functionality was too specific and it's better to implement in the user space if needed.
|
---|
106 | - Breaking - `merge` has been moved as a regular import (i.e. `import { merge } from 'webpack-merge'`).
|
---|
107 | - Breaking - Merge customization has been moved behind `mergeWithCustomize`.
|
---|
108 | - Breaking - Bump supported Node version to 12
|
---|
109 | - Feature - `customizeArray` supports wildcards now. Example: `'entry.*': 'prepend'`. #45 #99
|
---|
110 | - Feature - Throw an error in case a `Promise` is being merged. It's better to wrap configuration within a `Promise` and merge inside it. #81
|
---|
111 | - Fix - Drop lodash in favor of simpler dependencies. #134
|
---|
112 | - Fix - Make `unique` merge from right to left to match behavior elsewhere. #119
|
---|
113 | - Fix - Make sure `unique` doesn't lose non-unique items to merge. #125
|
---|
114 |
|
---|
115 | Special thanks to Google and Addy Osmani for supporting the work financially as it allowed me to complete the work required by the new major release.
|
---|
116 |
|
---|
117 | ## 4.2.2 / 2019-08-27
|
---|
118 |
|
---|
119 | - Fix - Update minimum version of lodash to 4.17.15 in order to avoid `npm audit warning`. #116
|
---|
120 | - Docs - Improve `merge.unique` documentation. #103
|
---|
121 | - Docs - Add clear note about precedence. #115
|
---|
122 |
|
---|
123 | ## 4.2.1 / 2019-01-04
|
---|
124 |
|
---|
125 | - Feature - Support `oneOf` at `merge.smart`. #111
|
---|
126 | - Fix - If there's only single array to merge, clone it. #106
|
---|
127 |
|
---|
128 | ## 4.1.4 / 2018-08-01
|
---|
129 |
|
---|
130 | - Maintenance - Remove bitHound from the README as it closed down. #102
|
---|
131 |
|
---|
132 | ## 4.1.3 / 2018-06-14
|
---|
133 |
|
---|
134 | - Fix - Smart merge respects the existing loader order #79, #101
|
---|
135 |
|
---|
136 | ## 4.1.2 / 2017-02-22
|
---|
137 |
|
---|
138 | - Maintenance - Update lodash, #97, #98
|
---|
139 |
|
---|
140 | ## 4.1.1 / 2017-11-01
|
---|
141 |
|
---|
142 | - Docs - Add `customizeArray` and `customizeObject` examples. #93
|
---|
143 |
|
---|
144 | ## 4.1.0 / 2017-03-16
|
---|
145 |
|
---|
146 | - Feature - `merge.multiple` to allow working with webpack multi-compiler mode. It accepts multiple objects and returns an array you can push to webpack. #74
|
---|
147 |
|
---|
148 | ## 4.0.0 / 2017-03-06
|
---|
149 |
|
---|
150 | - Breaking feature - `merge.smart` allows re-ordering loaders like below. #70
|
---|
151 |
|
---|
152 | ```javascript
|
---|
153 | merge.smart(
|
---|
154 | {
|
---|
155 | loaders: [
|
---|
156 | {
|
---|
157 | test: /\.js$/,
|
---|
158 | loaders: ["babel"],
|
---|
159 | },
|
---|
160 | ],
|
---|
161 | },
|
---|
162 | {
|
---|
163 | loaders: [
|
---|
164 | {
|
---|
165 | test: /\.js$/,
|
---|
166 | loaders: ["react-hot", "babel"],
|
---|
167 | },
|
---|
168 | ],
|
---|
169 | }
|
---|
170 | );
|
---|
171 | // will become
|
---|
172 | {
|
---|
173 | loaders: [
|
---|
174 | {
|
---|
175 | test: /\.js$/,
|
---|
176 | // order of second argument is respected
|
---|
177 | loaders: ["react-hot", "babel"],
|
---|
178 | },
|
---|
179 | ];
|
---|
180 | }
|
---|
181 | ```
|
---|
182 |
|
---|
183 | ## 3.0.0 / 2017-02-19
|
---|
184 |
|
---|
185 | - Breaking fix - `merge.smart` should not merge a child missing `include`/`exclude` to a parent that has either. This is safer and more predictable behavior than the old one. #69
|
---|
186 |
|
---|
187 | ## 2.6.1 / 2017-01-29
|
---|
188 |
|
---|
189 | - Bug fix - `merge.smart` should not merge rules that have differing `enforce` fields. #65
|
---|
190 |
|
---|
191 | ## 2.6.0 / 2017-01-27
|
---|
192 |
|
---|
193 | - Bug fix - Support `replace` mode for `merge.smartStrategy`. #63
|
---|
194 |
|
---|
195 | ## 2.5.0 / 2017-01-26
|
---|
196 |
|
---|
197 | - Bug fix - Make sure `merge.smartStrategy` works with higher level nesting like `'module.rules.use': 'prepend'`. #64
|
---|
198 |
|
---|
199 | ## 2.4.0 / 2017-01-12
|
---|
200 |
|
---|
201 | - Feature - Add `merge.unique` helper that plugs into `customizeArray`. This allows you to force only one plugin of a type to the end result. #58
|
---|
202 |
|
---|
203 | ## 2.3.1 / 2017-01-06
|
---|
204 |
|
---|
205 | - Bug fix - Clear up `CopyWebpackPlugin` handling. #56
|
---|
206 |
|
---|
207 | ## 2.3.0 / 2017-01-06
|
---|
208 |
|
---|
209 | - Refactor - Depend only on `lodash` instead of individual packages as latter has been discontinued. #52
|
---|
210 |
|
---|
211 | ## 2.2.0 / 2017-01-05
|
---|
212 |
|
---|
213 | - Bug fix - Drop `merge.smartStrategy(rules, plugins)` as that caused other issues (prototype copying for complex cases). That needs a better approach. #55
|
---|
214 |
|
---|
215 | ## 2.1.1 / 2017-01-05
|
---|
216 |
|
---|
217 | - Bug fix - Avoid recursion at `merge.smart`. #53
|
---|
218 |
|
---|
219 | ## 2.1.0 / 2017-01-05
|
---|
220 |
|
---|
221 | - Feature - Allow `merge.smartStrategy` to merge plugin contents. API: `merge.smartStrategy(rules, plugins)`. #44. Example:
|
---|
222 |
|
---|
223 | ```javascript
|
---|
224 | const output = merge.smartStrategy(
|
---|
225 | {
|
---|
226 | entry: 'prepend', // or 'replace'
|
---|
227 | 'module.loaders': 'prepend'
|
---|
228 | },
|
---|
229 | ['LoaderOptionsPlugin']
|
---|
230 | )(object1, object2, object3, ...);
|
---|
231 | ```
|
---|
232 |
|
---|
233 | ## 2.0.0 / 2016-12-22
|
---|
234 |
|
---|
235 | - Breaking - Disallow overriding configuration with empty arrays/objects (#48). If you want to override, use `merge.strategy`. Example:
|
---|
236 |
|
---|
237 | ```javascript
|
---|
238 | const a = {
|
---|
239 | entry: ["foo"],
|
---|
240 | };
|
---|
241 | const b = {
|
---|
242 | entry: [],
|
---|
243 | };
|
---|
244 |
|
---|
245 | merge(a, b); // Yields a result, not b like before.
|
---|
246 | ```
|
---|
247 |
|
---|
248 | ## 1.1.2 / 2016-12-18
|
---|
249 |
|
---|
250 | - Bug fix - `merge({ entry: {} })` should return the same result as input instead of a function.
|
---|
251 |
|
---|
252 | ## 1.1.1 / 2016-12-11
|
---|
253 |
|
---|
254 | - Bug fix - Support previously undocumented, yet used, `merge([<object>])` format. This works with all available functions. #46
|
---|
255 |
|
---|
256 | ## 1.1.0 / 2016-12-09
|
---|
257 |
|
---|
258 | - Feature - Allow `merge` behavior to be customized with overrides. Example:
|
---|
259 |
|
---|
260 | ```javascript
|
---|
261 | var output = merge({
|
---|
262 | customizeArray(a, b, key) { return [...a, ...b]; },
|
---|
263 | customizeObject(a, b, key) { return mergeWith(a, b); }
|
---|
264 | })(object1, object2, object3, ...);
|
---|
265 | ```
|
---|
266 |
|
---|
267 | This allows you to guarantee array uniqueness and so on.
|
---|
268 |
|
---|
269 | ## 1.0.2 / 2016-11-29
|
---|
270 |
|
---|
271 | - Bug fix - `merge` should not mutate inputs with mismatched keys.
|
---|
272 |
|
---|
273 | ## 1.0.0 / 2016-11-28
|
---|
274 |
|
---|
275 | - Feature: Support merging Webpack 2 Rule.use. #38
|
---|
276 | - Bug fix - Don't concat loaders if the first matching entry's include/exclude doesn't match. #39
|
---|
277 |
|
---|
278 | ## 0.20.0 / 2016-11-27
|
---|
279 |
|
---|
280 | - Feature: Add support for merging functions. This feature has been designed `postcss` in mind. It executes the functions, picks their results, and packs them again.
|
---|
281 |
|
---|
282 | ## 0.19.0 / 2016-11-26
|
---|
283 |
|
---|
284 | - Feature: Add support for 'replace' option at `merge.strategy`. It literally replaces the old field value with the newer one. #40
|
---|
285 |
|
---|
286 | ## 0.18.0 / 2016-11-24
|
---|
287 |
|
---|
288 | - Feature: Add support for recursive definitions at `merge.strategy`. Example:
|
---|
289 |
|
---|
290 | ```javascript
|
---|
291 | var output = merge.strategy({
|
---|
292 | entry: 'prepend',
|
---|
293 | 'module.loaders': 'prepend'
|
---|
294 | })(object1, object2, object3, ...);
|
---|
295 | ```
|
---|
296 |
|
---|
297 | - Feature: Add `merge.smartStrategy`. This combines the ideas of `merge.smart` and `merge.strategy` into one. Example:
|
---|
298 |
|
---|
299 | ```javascript
|
---|
300 | var output = merge.smartStrategy({
|
---|
301 | entry: 'prepend',
|
---|
302 | 'module.loaders': 'prepend'
|
---|
303 | })(object1, object2, object3, ...);
|
---|
304 | ```
|
---|
305 |
|
---|
306 | ## 0.17.0 / 2016-11-16
|
---|
307 |
|
---|
308 | - Feature: Add support for `merge.strategy`. Now you can customize merging behavior per root level configuration field. Example: `merge.strategy({ entry: 'prepend' })(object1, object2, object3, ...);`. #17
|
---|
309 |
|
---|
310 | ## 0.16.0 / 2016-11-14
|
---|
311 |
|
---|
312 | - Feature: Add support for webpack 2 at `merge.smart`. It should pick up `module.rules` as you might expect now. #35
|
---|
313 |
|
---|
314 | ## 0.15.0 / 2016-10-18
|
---|
315 |
|
---|
316 | - Breaking: Rework `merge.smart` so that it **appends** loaders instead of **prepending** them. This is the logical thing to do as it allows you to specify behavior better as you `merge`. #32
|
---|
317 |
|
---|
318 | ## 0.14.1 / 2016-07-25
|
---|
319 |
|
---|
320 | - Docs: Improve package description. #23.
|
---|
321 | - Bug fix - Let `merge.smart` merge loaders based on their full name instead of first letter. Thanks to @choffmeister. #26.
|
---|
322 |
|
---|
323 | ## 0.14.0 / 2016-06-05
|
---|
324 |
|
---|
325 | - Feature: Allow `merge.smart` to merge `loaders` if `exclude` is the same. Thanks to @mshwery. #21.
|
---|
326 |
|
---|
327 | ## 0.13.0 / 2016-05-24
|
---|
328 |
|
---|
329 | - Bug fix: Allow `merge.smart` to merge configuration if `include` is defined. Thanks to @blackrabbit99. #20.
|
---|
330 |
|
---|
331 | ## 0.12.0 / 2016-04-19
|
---|
332 |
|
---|
333 | - Feature: Support `include/exclude` at `merge.smart` for `loader` definition too. Thanks to @Whoaa512. #16.
|
---|
334 |
|
---|
335 | ## 0.11.0 / 2016-04-18
|
---|
336 |
|
---|
337 | - Feature: Support `include/exclude` at `merge.smart` when its set only in a parent. #15.
|
---|
338 |
|
---|
339 | ## 0.10.0 / 2016-04-10
|
---|
340 |
|
---|
341 | - Feature: Support `include/exclude` at `merge.smart`. Thanks to @siready. #14.
|
---|
342 |
|
---|
343 | ## 0.9.0 / 2016-04-08
|
---|
344 |
|
---|
345 | - Feature: Allow existing objects/arrays to be emptied with an empty object/array later in merge. This overriding behavior is useful for example emptying your `entry` configuration.
|
---|
346 |
|
---|
347 | ## 0.8.4 / 2016-03-17
|
---|
348 |
|
---|
349 | - Bug fix: _webpack-merge_ should not mutate inputs. #12
|
---|
350 |
|
---|
351 | ## 0.8.3 / 2016-03-02
|
---|
352 |
|
---|
353 | - Bug fix: Drop `files` field from _package.json_ as it wasn't including the dist correctly.
|
---|
354 |
|
---|
355 | ## 0.8.0 / 2016-03-02
|
---|
356 |
|
---|
357 | - Breaking: Change merging behavior so that only loaders get prepended. The rest follow appending logic. This makes `entry` array merging behavior logical. Prepend makes sense only for loaders after all. #10
|
---|
358 |
|
---|
359 | ## 0.7.3 / 2016-01-11
|
---|
360 |
|
---|
361 | - Bug fix: Do not error when there are no matching loaders. Thanks @GreenGremlin!
|
---|
362 |
|
---|
363 | ## 0.7.2 / 2016-01-08
|
---|
364 |
|
---|
365 | - Regenerate tarball. The problem was that there were some old dependencies included. Closes #7.
|
---|
366 |
|
---|
367 | ## 0.7.1 / 2016-01-03
|
---|
368 |
|
---|
369 | - Improve performance by defaulting to `concat` and by dropping a redundant check. Thanks @davegomez!
|
---|
370 |
|
---|
371 | ## 0.7.0 / 2015-12-31
|
---|
372 |
|
---|
373 | - Bug fix: Arrays get merged within nested structures correctly now. Array items are prepended (reverse order compared to earlier). This is related to the change made in _0.6.0_. Incidentally this change affects normal merge as well.
|
---|
374 | - Smart merge: If a loader contains either `include` or `exclude`, it will generate separate entries instead of merging. Without this the configuration might change in an unpredictable manner.
|
---|
375 |
|
---|
376 | ## 0.6.0 / 2015-12-30
|
---|
377 |
|
---|
378 | - Support `preLoaders` and `postLoaders`. Previously only `loaders` were supported.
|
---|
379 | - Breaking: Change smart merging behavior for `loaders` field so that it prepends loaders instead of appending them. The benefit of this is that now it's possible to specialize loader setup in a predictable manner. For example you can have a linter set up at the root and expect it to become evaluated first always.
|
---|
380 |
|
---|
381 | ## 0.5.1 / 2015-12-26
|
---|
382 |
|
---|
383 | - Fix `merge` object/array case (missing `bind`). The behavior should be correct now.
|
---|
384 |
|
---|
385 | ## 0.5.0 / 2015-12-26
|
---|
386 |
|
---|
387 | - Breaking: Push smart merging behind `merge.smart`. Now `merge` behaves exactly as in _0.3.0_ series.
|
---|
388 |
|
---|
389 | ## 0.4.0 / 2015-12-23
|
---|
390 |
|
---|
391 | - Dropped changelog generator. It's better to write these by hand.
|
---|
392 | - Breaking: Added smart merging (@GreenGremlin)
|
---|
393 |
|
---|
394 | ## 0.3.2 / 2015-11-23
|
---|
395 |
|
---|
396 | - Tweaked changelog generator process.
|
---|
397 |
|
---|
398 | ## 0.3.1 / 2015-11-23
|
---|
399 |
|
---|
400 | - Added changelog generator.
|
---|
401 |
|
---|
402 | ## 0.3.0 / 2015-11-13
|
---|
403 |
|
---|
404 | - Improved formatting
|
---|
405 | - Allowed an arbitrary amount of objects to be merged
|
---|
406 |
|
---|
407 | ## 0.2.0 / 2015-08-30
|
---|
408 |
|
---|
409 | - Only require lodash modules used by the package (@montogeek)
|
---|
410 | - Removed lodash.isarray dependency, use Array.isArray standard object
|
---|
411 |
|
---|
412 | ## 0.1.3 / 2015-08-10
|
---|
413 |
|
---|
414 | - Improved README example
|
---|
415 |
|
---|
416 | ## 0.1.2 / 2015-07-01
|
---|
417 |
|
---|
418 | - Simplified example
|
---|
419 |
|
---|
420 | ## 0.1.1 / 2015-06-26
|
---|
421 |
|
---|
422 | - Fixed travis link
|
---|
423 |
|
---|
424 | ## 0.1.0 / 2015-06-26
|
---|
425 |
|
---|
426 | - Initial implementation
|
---|