mirror of https://github.com/webpack/webpack.git
Merge pull request #3889 from cletusw/args-undefined-master
Support UglifyJsPlugin with no arguments in CLI --plugin
This commit is contained in:
commit
951a7603d2
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
module.exports = "foo";
|
||||
|
|
@ -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();
|
||||
};
|
||||
|
|
@ -0,0 +1 @@
|
|||
--plugin webpack/lib/optimize/UglifyJsPlugin
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
var path = require("path");
|
||||
|
||||
module.exports = {
|
||||
entry: path.resolve(__dirname, "./index"),
|
||||
};
|
||||
Loading…
Reference in New Issue