We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 060268b commit 2d7ab35Copy full SHA for 2d7ab35
packages/serve/src/index.ts
@@ -14,7 +14,7 @@ class ServeCommand {
14
let options = {};
15
16
if (isNewDevServerCLIAPI) {
17
- if (typeof webpack.cli.getArguments === "function") {
+ if (webpack.cli && typeof webpack.cli.getArguments === "function") {
18
options = webpack.cli.getArguments(devServer.schema);
19
} else {
20
options = devServer.cli.getArguments();
@@ -176,7 +176,7 @@ class ServeCommand {
176
}, {});
177
const result = Object.assign({}, compiler.options.devServer);
178
const problems = (
179
- typeof webpack.cli.processArguments === "function"
+ webpack.cli && typeof webpack.cli.processArguments === "function"
180
? webpack.cli
181
: devServer.cli
182
).processArguments(args, result, values);
0 commit comments