Skip to content

Commit

Permalink
fix: duplicate entry issue
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jun 20, 2020
1 parent f12efe4 commit 9248125
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 27 deletions.
24 changes: 19 additions & 5 deletions packages/webpack-cli/lib/utils/cli-flags.js
Expand Up @@ -22,11 +22,15 @@ const flagsFromCore = version.startsWith(5)
meta.type = Boolean;
meta.usage = `--${flag}`;
}
return {
...meta,
name: flag,
group: 'core',
};

// Don't return entry to avoid duplicate entry
return flag !== 'entry'
? {
...meta,
name: flag,
group: 'core',
}
: {};
})
: [];

Expand Down Expand Up @@ -94,6 +98,16 @@ module.exports = {
},
],
core: [
{
name: 'entry',
usage: '--entry <path to entry file> | --entry <path> --entry <path>',
type: String,
multiple: true,
defaultOption: true,
group: BASIC_GROUP,
description: 'The entry point(s) of your application e.g. ./src/main.js',
link: 'https://webpack.js.org/concepts/#entry',
},
{
name: 'config',
usage: '--config <path to webpack configuration file>',
Expand Down
22 changes: 0 additions & 22 deletions test/core-flags/core-flags.test.js

This file was deleted.

0 comments on commit 9248125

Please sign in to comment.