Skip to content
Merged
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
10 changes: 5 additions & 5 deletions packages/angular/build/src/utils/check-port.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ function createInUseError(port: number): Error {
}

export async function checkPort(port: number, host: string): Promise<number> {
// Disabled due to Vite not handling port 0 and instead always using the default value (5173)
// TODO: Enable this again once Vite is fixed
// if (port === 0) {
// return 0;
// }
// A port of 0 requests an OS-assigned ephemeral port. Vite now binds this correctly
// (https://github.com/vitejs/vite/pull/23158); webpack-dev-server always has.
if (port === 0) {
return 0;
}

return new Promise<number>((resolve, reject) => {
const server = createServer();
Expand Down
Loading