Socket
Socket
Sign inDemoInstall

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 0.15.0 to 0.16.0

7

CHANGELOG.md

@@ -0,5 +1,10 @@

0.16.0 / 2016-11-14
===================
* Feature: Add support for webpack 2 at `merge.smart`. It should pick up `module.rules` as you might expect now. #35
0.15.0 / 2016-10-18
===================
* 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
* 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

@@ -6,0 +11,0 @@ 0.14.1 / 2016-07-25

@@ -72,2 +72,9 @@ 'use strict';

// webpack 2 support
if (foundLoader.rules) {
var newRules = loaderConfig.loader ? [loaderConfig.loader] : loaderConfig.rules || [];
foundLoader.rules = mergeLoaders(newRules, foundLoader.rules);
}
if (loaderConfig.include) {

@@ -130,3 +137,3 @@ foundLoader.include = loaderConfig.include;

function isLoader(key) {
return ['preLoaders', 'loaders', 'postLoaders'].indexOf(key) >= 0;
return ['preLoaders', 'loaders', 'postLoaders', 'rules'].indexOf(key) >= 0;
}

@@ -5,9 +5,8 @@ {

"author": "Juho Vepsalainen <bebraw@gmail.com>",
"version": "0.15.0",
"version": "0.16.0",
"scripts": {
"build": "babel src -d lib",
"watch": "babel src --watch -d lib",
"watch": "npm-watch",
"test": "mocha ./test",
"test:lint": "eslint . ---cache",
"watch:test": "mocha ./test --watch",
"preversion": "npm run test:lint && npm run build && npm test && git commit --allow-empty -am \"Update lib\""

@@ -28,3 +27,4 @@ },

"git-prepush-hook": "^1.0.1",
"mocha": "^2.2.5"
"mocha": "^2.2.5",
"npm-watch": "^0.1.6"
},

@@ -48,3 +48,21 @@ "repository": {

"test"
]
],
"watch": {
"build": {
"patterns": [
"src/**/*.js"
]
},
"test": {
"patterns": [
"test.js"
]
},
"test:lint": {
"patterns": [
"src/**/*.js",
"test.js"
]
}
}
}

@@ -77,4 +77,6 @@ [![build status](https://secure.travis-ci.org/survivejs/webpack-merge.svg)](http://travis-ci.org/survivejs/webpack-merge)

Note that you can override existing arrays/objects like this:
### Empty Arrays and Objects Override
You can override existing arrays/objects like this:
```javascript

@@ -98,2 +100,4 @@ var common = {

Note that the logic picks up webpack 2 `rules` kind of syntax as well. The examples below have been written in webpack 1 syntax.
**Loader string values `loader: 'babel'` override each other.**

@@ -217,2 +221,9 @@

## Development
1. `npm i`
2. `npm run watch`
Before contributing, please open an issue where to discuss.
## Contributors

@@ -219,0 +230,0 @@

@@ -64,2 +64,9 @@ const isArray = Array.isArray;

// webpack 2 support
if (foundLoader.rules) {
const newRules = loaderConfig.loader ? [loaderConfig.loader] : loaderConfig.rules || [];
foundLoader.rules = mergeLoaders(newRules, foundLoader.rules);
}
if (loaderConfig.include) {

@@ -126,3 +133,3 @@ foundLoader.include = loaderConfig.include;

function isLoader(key) {
return ['preLoaders', 'loaders', 'postLoaders'].indexOf(key) >= 0;
return ['preLoaders', 'loaders', 'postLoaders', 'rules'].indexOf(key) >= 0;
}

@@ -11,2 +11,3 @@ /* eslint-env mocha */

normalMergeTests(merge, 'postLoaders');
normalMergeTests(merge, 'rules');
mergeTests(merge);

@@ -22,2 +23,3 @@ });

smartMergeTests(merge, 'postLoaders');
smartMergeTests(merge, 'rules');
mergeTests(merge);

@@ -24,0 +26,0 @@ });

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