Skip to content

Commit c1fbfbe

Browse files
fix: problems with serve and build
1 parent be007f5 commit c1fbfbe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/serve/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class ServeCommand {
113113
try {
114114
servers = await startDevServer(compiler, devServerOptions, options, logger);
115115
} catch (error) {
116-
if (error.name === 'ValidationError') {
116+
if (cli.isValidationError(error)) {
117117
logger.error(error.message);
118118
} else {
119119
logger.error(error);

packages/webpack-cli/lib/webpack-cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ class WebpackCLI {
16291629
config.options,
16301630
callback
16311631
? (error, stats) => {
1632-
if (this.isValidationError(error)) {
1632+
if (error && this.isValidationError(error)) {
16331633
logger.error(error.message);
16341634
process.exit(2);
16351635
}

0 commit comments

Comments
 (0)