Merge pull request #3889 from cletusw/args-undefined-master

Support UglifyJsPlugin with no arguments in CLI --plugin
This commit is contained in:
Tobias Koppers 2017-01-11 13:03:23 +01:00 committed by GitHub
commit 951a7603d2
5 changed files with 18 additions and 1 deletions

View File

@ -227,7 +227,7 @@ module.exports = function(yargs, argv, convertOptions) {
function loadPlugin(name) {
var loadUtils = require("loader-utils");
var args = null;
var args;
try {
var p = name && name.indexOf("?");
if(p > -1) {

View File

@ -0,0 +1 @@
module.exports = "foo";

View File

@ -0,0 +1,10 @@
"use strict";
module.exports = function testAssertions(code, stdout, stderr) {
code.should.be.exactly(0);
stdout.should.be.ok();
stdout[4].should.containEql("bytes"); // without uglifyjs it's multiple kBs
stderr.should.be.empty();
};

View File

@ -0,0 +1 @@
--plugin webpack/lib/optimize/UglifyJsPlugin

View File

@ -0,0 +1,5 @@
var path = require("path");
module.exports = {
entry: path.resolve(__dirname, "./index"),
};