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.2.0 to 5.3.0

6

CHANGELOG.md
# Changelog
## 5.3.0 / 2020-10-30
- Fix - Expose `Configuration` type through a generic to TypeScript to support both webpack 4 and 5 #141 #154
In case you use webpack 4, please change your typing as instructed in the readme as the default type is loose but non-breaking.
## 5.2.0 / 2020-10-07

@@ -4,0 +10,0 @@

7

dist/index.d.ts

@@ -1,6 +0,5 @@

import { Configuration } from "webpack";
import unique from "./unique";
import { CustomizeRule, ICustomizeOptions, Key } from "./types";
declare function merge(firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]): Configuration;
declare function mergeWithCustomize(options: ICustomizeOptions): (firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]) => Configuration;
declare function merge<Configuration extends object>(firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]): Configuration;
declare function mergeWithCustomize<Configuration extends object>(options: ICustomizeOptions): (firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]) => Configuration;
declare function customizeArray(rules: {

@@ -12,3 +11,3 @@ [s: string]: CustomizeRule;

};
declare function mergeWithRules(rules: Rules): (firstConfiguration: Configuration | Configuration[], ...configurations: Configuration[]) => Configuration;
declare function mergeWithRules(rules: Rules): (firstConfiguration: object | object[], ...configurations: object[]) => object;
declare function customizeObject(rules: {

@@ -15,0 +14,0 @@ [s: string]: CustomizeRule;

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

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

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

"devDependencies": {
"@types/webpack": "^4.41.22",
"@types/estree": "0.0.45",
"husky": "^4.3.0",
"tsdx": "^0.14.0",
"tslib": "^2.0.1",
"typescript": "^4.0.3",
"webpack": "^4.44.2"
"tsdx": "^0.14.1",
"tslib": "^2.0.3",
"typescript": "^4.0.5",
"webpack": "^5.3.2"
},

@@ -32,0 +32,0 @@ "repository": {

@@ -5,5 +5,5 @@ [![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)

_webpack-merge_ provides a `merge` function that concatenates arrays and merges objects creating a new object. If functions are encountered, it will execute them, run the results through the algorithm, and then wrap the returned values within a function again.
**webpack-merge** provides a `merge` function that concatenates arrays and merges objects creating a new object. If functions are encountered, it will execute them, run the results through the algorithm, and then wrap the returned values within a function again.
This behavior is particularly useful in configuring webpack although it has uses beyond it. Whenever you need to merge configuration objects, _webpack-merge_ can come in handy.
This behavior is particularly useful in configuring webpack although it has uses beyond it. Whenever you need to merge configuration objects, **webpack-merge** can come in handy.

@@ -245,2 +245,15 @@ ## **`merge(...configuration | [...configuration])`**

## Using with TypeScript
**webpack-merge** supports TypeScript out of the box. You should pass `Configuration` type from webpack to it as follows:
```typescript
import { Configuration } from "webpack";
import { merge } from "webpack-merge";
const config = merge<Configuration>({...}, {...});
...
```
## Development

@@ -247,0 +260,0 @@

Sorry, the diff of this file is not supported yet

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