-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Open
Labels
area: @angular/builddevkit/build-angular:dev-serverflag: breaking changetarget: featureThis PR is targeted for a feature branch (outside of main and semver branches)This PR is targeted for a feature branch (outside of main and semver branches)
Description
Command
serve
Description
This is supported by nextjs: https://nextjs.org/docs/app/api-reference/cli/next#next-dev-options
The use case is for the firebase emulator where we want to serve both nextjs and angular apps at specific ports determined by our emulator.
If ng serve just supported process.env.PORT then the implementation is simple and everything works as expected.
Currently, without PORT support in ng serve, we have some imperfect hack where we:
- add
--port <>if we detect a start command that isng servedirectly - but we don't support this if the user is using
npm run devas the start command which points to some underlying command that could be anything and could include its own --port specification which doesn't match the port the emulator expects. (AppHosting emulator: "TIMEOUT: Port 5002 on localhost was not active within 60000ms" firebase/firebase-tools#9699)
(Filing this for tracking purposes only and to link to discussions in issues and PRs. We're also going to better document the caveats above in our own user docs)
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Metadata
Metadata
Assignees
Labels
area: @angular/builddevkit/build-angular:dev-serverflag: breaking changetarget: featureThis PR is targeted for a feature branch (outside of main and semver branches)This PR is targeted for a feature branch (outside of main and semver branches)