Skip to content

Commit 57f28c8

Browse files
refactor: fix logic
1 parent 621af89 commit 57f28c8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/webpack-cli/src/webpack-cli.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ class WebpackCLI {
624624
}
625625

626626
if (options.options) {
627-
let commandOptions: CommandOption[] = [];
627+
let commandOptions: CommandOption[];
628628

629629
if (typeof options.options === "function") {
630630
if (
@@ -644,6 +644,8 @@ class WebpackCLI {
644644
} else {
645645
commandOptions = await options.options(command);
646646
}
647+
} else {
648+
commandOptions = options.options;
647649
}
648650

649651
for (const option of commandOptions) {

0 commit comments

Comments
 (0)