Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-merge

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-merge - npm Package Compare versions

Comparing version 5.4.1 to 5.5.0

4

CHANGELOG.md
# Changelog
## 5.5.0 / 2020-12-10
- Feat - Allow `mergeWithRules` to merge based on rules without a match. #151 #159
## 5.4.1 / 2020-12-08

@@ -4,0 +8,0 @@

@@ -112,2 +112,5 @@ "use strict";

}
if (typeof currentRule === "string") {
return mergeIndividualRule({ currentRule: currentRule, a: a, b: b });
}
return undefined;

@@ -192,2 +195,15 @@ }

}
function mergeIndividualRule(_a) {
var currentRule = _a.currentRule, a = _a.a, b = _a.b;
// What if there's no match?
switch (currentRule) {
case types_1.CustomizeRule.Append:
return a.concat(b);
case types_1.CustomizeRule.Prepend:
return b.concat(a);
case types_1.CustomizeRule.Replace:
return b;
}
return a;
}
function last(arr) {

@@ -194,0 +210,0 @@ return arr[arr.length - 1];

2

package.json

@@ -5,3 +5,3 @@ {

"author": "Juho Vepsalainen <bebraw@gmail.com>",
"version": "5.4.1",
"version": "5.5.0",
"scripts": {

@@ -8,0 +8,0 @@ "build": "tsc",

@@ -153,4 +153,4 @@ [![Financial Contributors on Open Collective](https://opencollective.com/webpack-merge/all/badge.svg?label=financial+contributors)](https://opencollective.com/webpack-merge) [![build status](https://secure.travis-ci.org/survivejs/webpack-merge.svg)](http://travis-ci.org/survivejs/webpack-merge) [![codecov](https://codecov.io/gh/survivejs/webpack-merge/branch/master/graph/badge.svg)](https://codecov.io/gh/survivejs/webpack-merge)

When the order of elements of the `<field>` in the first configuration differs from the order in the second configuration, the latter is preserved.
When the order of elements of the `<field>` in the first configuration differs from the order in the second configuration, the latter is preserved.
```javascript

@@ -245,3 +245,3 @@ const { mergeWithCustomize, unique } = require("webpack-merge");

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.
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. If a match doesn't exist above a rule, then it will apply the rule automatically.

@@ -248,0 +248,0 @@ ## Using with TypeScript

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc