Skip to content

fix(@angular-devkit/build-angular): ensure port 0 uses random port with Vite development server#26614

Merged
clydin merged 1 commit intoangular:mainfrom
clydin:vite/support-port-zero
Dec 8, 2023
Merged

fix(@angular-devkit/build-angular): ensure port 0 uses random port with Vite development server#26614
clydin merged 1 commit intoangular:mainfrom
clydin:vite/support-port-zero

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Dec 7, 2023

Vite appears to consider a port value of 0 as a falsy value and use the default Vite port of 5173 when zero is used as a value for the development server port option. To workaround this issue, the port checker code now explicitly handles the zero value case and determines a random port as would be done automatically by the Webpack-based development server.

…th Vite development server

Vite appears to consider a port value of `0` as a falsy value and use the default Vite port of
`5173` when zero is used as a value for the development server port option. To workaround this
issue, the port checker code now explicitly handles the zero value case and determines a random
port as would be done automatically by the Webpack-based development server.
@clydin clydin added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 7, 2023
@clydin clydin requested a review from alan-agius4 December 7, 2023 19:40
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 8, 2023
@clydin clydin merged commit 5b8e2d5 into angular:main Dec 8, 2023
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 8, 2024
@clydin clydin deleted the vite/support-port-zero branch February 1, 2024 20:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants