Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: minimum supported webpack version is 5.82.0 #4303

Merged
merged 8 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -633,7 +633,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 @@ -1043,20 +1043,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",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will come from webpack schema since https://github.com/webpack/webpack/releases/tag/v5.82.0

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 @@ -1070,6 +1056,7 @@ class WebpackCLI implements IWebpackCLI {
"target",
"name",
"output-path",
"extends",
];

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