diff --git a/package.json b/package.json index 1cfd20f..541e9a5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-chain", - "version": "1.3.0", + "version": "1.4.0", "main": "src/Config.js", "repository": "mozilla-rpweb/webpack-chain", "keywords": [ diff --git a/src/Config.js b/src/Config.js index a143ecb..b29d51c 100644 --- a/src/Config.js +++ b/src/Config.js @@ -22,6 +22,7 @@ class Config { externals(externals) { this.options.set('externals', externals); + return this; } devtool(devtool) { diff --git a/src/Rule.js b/src/Rule.js index 81c1c65..240e2c1 100644 --- a/src/Rule.js +++ b/src/Rule.js @@ -85,6 +85,10 @@ module.exports = class extends ChainedMap { return this.exclude(...value); } + case 'test': { + return this.test(new RegExp(value)); + } + case 'loader': { return Object .keys(value)