Skip to content

Commit 951a760

Browse files
authored
Merge pull request webpack#3889 from cletusw/args-undefined-master
Support UglifyJsPlugin with no arguments in CLI --plugin
2 parents 028c513 + d69c85f commit 951a760

5 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎bin/convert-argv.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ module.exports = function(yargs, argv, convertOptions) {
227227

228228
function loadPlugin(name) {
229229
var loadUtils = require("loader-utils");
230-
var args = null;
230+
var args;
231231
try {
232232
var p = name && name.indexOf("?");
233233
if(p > -1) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = "foo";
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"use strict";
2+
3+
module.exports = function testAssertions(code, stdout, stderr) {
4+
code.should.be.exactly(0);
5+
6+
stdout.should.be.ok();
7+
stdout[4].should.containEql("bytes"); // without uglifyjs it's multiple kBs
8+
9+
stderr.should.be.empty();
10+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--plugin webpack/lib/optimize/UglifyJsPlugin
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var path = require("path");
2+
3+
module.exports = {
4+
entry: path.resolve(__dirname, "./index"),
5+
};

0 commit comments

Comments
 (0)