Skip to content

Commit

Permalink
refactor!: minimum supported webpack version is 5.82.0 (#4303)
Browse files Browse the repository at this point in the history
\
  • Loading branch information
snitin315 committed Dec 17, 2024
1 parent a61a15a commit 59e9117
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 35 deletions.
2 changes: 1 addition & 1 deletion packages/webpack-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@types/envinfo": "^7.8.1"
},
"peerDependencies": {
"webpack": "5.x.x"
"webpack": "^5.82.0"
},
"peerDependenciesMeta": {
"webpack-bundle-analyzer": {
Expand Down
17 changes: 2 additions & 15 deletions packages/webpack-cli/src/webpack-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ class WebpackCLI implements IWebpackCLI {
makeOption(command: WebpackCLICommand, option: WebpackCLIBuiltInOption) {
let mainOption: WebpackCLIMainOption;
let negativeOption;
const flagsWithAlias = ["devtool", "output-path", "target", "watch"];
const flagsWithAlias = ["devtool", "output-path", "target", "watch", "extends"];

if (flagsWithAlias.includes(option.name)) {
option.alias = option.name[0];
Expand Down Expand Up @@ -1044,20 +1044,6 @@ class WebpackCLI implements IWebpackCLI {
description: "Stop webpack-cli process with non-zero exit code on warnings from webpack.",
helpLevel: "minimum",
},
// TODO remove this in the next major release, because not all webpack versions have this flag in CLI options
{
name: "extends",
alias: "e",
configs: [
{
type: "string",
},
],
multiple: true,
description:
"Path to the configuration to be extended (only works when using webpack-cli).",
helpLevel: "minimum",
},
];

// Options from webpack core to be included in the minimum help output
Expand All @@ -1071,6 +1057,7 @@ class WebpackCLI implements IWebpackCLI {
"target",
"name",
"output-path",
"extends",
];

// Extract all the flags being exported from core.
Expand Down
Loading

0 comments on commit 59e9117

Please sign in to comment.