Closed TomekStaszkiewicz closed 3 years ago
I was wrong with using the assignin
- it is not working as the deep-merge
mechanism. It is performing only a shallow merge. I think that using lodash.merge
is the best solution for this one
This has caused unexpected duplication after webpack-dev-server hot updates, due to the following behavior of lodash.merge
:
> chunks = { main: ['a', 'b', 'c', 'd', 'e'] }
{ main: [ 'a', 'b', 'c', 'd', 'e' ] }
> merge(chunks, { main: ['foo', 'bar'] })
{ main: [ 'foo', 'bar', 'c', 'd', 'e' ] }
Opened #101 to fix this.
See #96
I checked what changed from version 0.4.3 and I noticed that back then the small library
deep-extend
was used to extend resulting contents. In version 1.0.0 it was replaced by small utilassign
, but I believe that someone made a small mistake, and actually the utilassignin
was meant to be used. After changing to that it seems to be working.