-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(react): ssr should serve correctly and e2e should function #17725
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 5ed18c3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Hi @Coly010 Sadly this doesn't work out of the box, neither does setting |
There's more than just changing the output file name happening here. I have tested it out of the box and can confirm it works. What issue are you seeing? |
create workspace when you run the auto generated e2e it doesn't work |
I.e. cypress does not launch |
Yes, this will fix that. The fix hasn't been released yet. It will be released soon with 16.4 of Nx |
Hi 👋 sadly no dice on the e2e running with new release |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
E2E and Serve of React SSR apps not functioning correctly.
The ssr-dev-server is not receiving build options from the js/node executor to be able to determine when the server has been started successfully.
Therefore, it can never set itself to a ready state.
This prevents cypress from being able to run.
The webpack executor also looks for the entry point based on
outputFileName
or else it will default tomain.js
.The node executor finds the entry point based on
main
in build options.Webpack executor is outputting
main.js
as the entrypoint, however, node executor is looking forserver.js
as the main option isserver.ts
.The setup-ssr generator does not set an
outputFileName
. Make it set anoutputFileName
to ensure consistency and behaviour.If user's want to change the name of the filename that is output, they can change this option and both executors will still function in unison.
Expected Behavior
Serving SSR and e2es should work.
setup-ssr generator should set an
outputFileName
Related Issue(s)
Fixes #17723 #17706