Open smasala opened 1 year ago
Yeah, facing a similar problem. Any resolution?
Yeah, facing a similar problem. Any resolution?
Yes, only to place the port exactly at that location:
targets['serve'].options.port
@FrozenPandaz Any help here
Yeah, facing a similar problem. Any resolution?
Yes, only to place the port exactly at that location:
targets['serve'].options.port
Thanks for this suggestion @smasala but then for multiple apps?
Thanks for this suggestion @smasala but then for multiple apps?
Not much you can do at the mo other than specify the port for each app.
The same timeout issue occurs when using a custom host
together with a custom port
in remote app development servers.
NX expects the host
to be equal to "localhost"
to avoid dev-server timeout every 20 minutes.
This is basically a bug around this place in the codebase: https://github.com/nrwl/nx/blob/dc3e1404b764445a30ff9a89fbd3aedda480b3d1/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts#L289
Some time ago there was an attempt to fix a similar issue here https://github.com/nrwl/nx/issues/17354 but the actual issue is still there.
Are there plans to support a custom host
for remote apps?
Hey! Sorry for the delay.
If I understand the OP correctly, having individual project configurations is inflexible?
@ndcunningham no probs. The problem was that port value was hardcoded at the "serve" target which is inflexible. This might not be the case anymore.
Current Behavior
Current implementation is inflexible when it comes to defining multiple configurations as the port is always expected to be defined in a specific location: https://github.com/nrwl/nx/blob/50d01d15677eb9165e24d759d790f60af22b9fff/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts#L49
Following configuration fails:
Expected Behavior
That of v15.9.2 where the remote is determined to be running by not evaluating the port. https://github.com/nrwl/nx/blob/15.9.2/packages/react/src/executors/module-federation-dev-server/module-federation-dev-server.impl.ts
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Operating System
Additional Information
No response