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
{{ message }}
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
Whenever we add new webpack-chain features, it increases the complexity of supporting/testing them
Looking at issues that people have reported, it seems that in many cases users are really wanting a clone feature, and are using toConfig() followed by .merge() to attempt to achieve that (even though it doesn't work due to (1) above). For example: #204 (comment)
In the remaining cases, it seems that users are using it as an alternative to the webpack-chain API, and passing in an object instead of making the method calls (eg: #228 (comment)). For me, I'm not a massive fan of supporting multiple ways of achieving the same functionality, particularly if it adds overhead/bugs.
It seems like if we added a real clone feature (filed as #212) then much of the need for .merge() would disappear?
Thoughts? Are there additional use-cases I've missed?
The text was updated successfully, but these errors were encountered:
Are you talking about .merge() on the root config or all .merge()s in things like ChainedMap, ChainedSet, etc?
I think at the root, perhaps .clone() would solve most use cases I can think of (except for migrating from legacy code), but I can see .merge() being useful on ChainedMap and ChainedSet when you want to say, reuse parts of another Rule, like in #129. You could still .clone() the rule, but getting it back into the config you want it to is not possible without .merge()
The
.merge()
feature has a number of limitations:.merge()
examples to make deviations from webpack schema clearer #237)rule.merge
#210, Support a single webpack entry #230)Looking at issues that people have reported, it seems that in many cases users are really wanting a clone feature, and are using
toConfig()
followed by.merge()
to attempt to achieve that (even though it doesn't work due to (1) above). For example:#204 (comment)
In the remaining cases, it seems that users are using it as an alternative to the webpack-chain API, and passing in an object instead of making the method calls (eg: #228 (comment)). For me, I'm not a massive fan of supporting multiple ways of achieving the same functionality, particularly if it adds overhead/bugs.
It seems like if we added a real clone feature (filed as #212) then much of the need for
.merge()
would disappear?Thoughts? Are there additional use-cases I've missed?
The text was updated successfully, but these errors were encountered: