Skip to content

Commit

Permalink
more feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alicewriteswrongs committed Apr 27, 2022
1 parent c395b49 commit adb3629
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/compiler/config/config-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const getUserConfigName = (config: d.UnvalidatedConfig, correctConfigName: keyof
for (const userConfigName of userConfigNames) {
if (userConfigName.toLowerCase() === correctConfigName.toLowerCase()) {
if (userConfigName !== correctConfigName) {
config.logger?.warn(`config "${userConfigName}" should be "${correctConfigName}"`);
config.logger.warn(`config "${userConfigName}" should be "${correctConfigName}"`);
return userConfigName;
}
break;
Expand Down
8 changes: 4 additions & 4 deletions src/compiler/config/validate-dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export const validateDevServer = (

devServer.address = devServer.address.split('/')[0];

if (isNumber(flags?.port)) {
devServer.port = flags?.port;
}

const addressSplit = devServer.address.split(':');
if (addressSplit.length > 1) {
if (!isNaN(addressSplit[1] as any)) {
Expand All @@ -40,10 +44,6 @@ export const validateDevServer = (
}
}

if (isNumber(flags?.port)) {
devServer.port = flags?.port;
}

if (devServer.port !== null && !isNumber(devServer.port)) {
if (devServer.address === 'localhost' || !isNaN(devServer.address.split('.')[0] as any)) {
devServer.port = 3333;
Expand Down

0 comments on commit adb3629

Please sign in to comment.