Skip to content

Commit

Permalink
fix(entry): fix a bug when --display-entrypoints=false does not hid…
Browse files Browse the repository at this point in the history
…e entries (#464)

* fix: fix a buy when `--display-entrypoints=false` does not hide entries

* fix

* test: add a test
  • Loading branch information
sfger authored and evenstensberg committed May 30, 2018
1 parent 9977406 commit c2398a2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ For more information, see https://webpack.js.org/api/cli/.`);
});

ifArg("display-entrypoints", function(bool) {
if (bool) outputOptions.entrypoints = true;
outputOptions.entrypoints = bool;
});

ifArg("display-reasons", function(bool) {
Expand Down
1 change: 1 addition & 0 deletions test/binCases/entry/display-entrypoints/a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "fileA";
1 change: 1 addition & 0 deletions test/binCases/entry/display-entrypoints/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "index";
6 changes: 6 additions & 0 deletions test/binCases/entry/display-entrypoints/stdin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"use strict";

module.exports = function testAssertions(code, stdout, stderr) {
expect(stdout.join(' ')).not.toContain("Entrypoint");
expect(stderr).toHaveLength(0);
};
1 change: 1 addition & 0 deletions test/binCases/entry/display-entrypoints/test.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--display-entrypoints false
5 changes: 5 additions & 0 deletions test/binCases/entry/display-entrypoints/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var path = require("path");

module.exports = {
entry: path.resolve(__dirname, "./index"),
};

0 comments on commit c2398a2

Please sign in to comment.