Skip to content
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(web): spa flag should correctly define redirect #22487

Merged
merged 1 commit into from Mar 26, 2024

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Mar 25, 2024

Current Behavior

The @nx/web:file-server executor does not set up spa handling correctly. The current solution still causes the browser to throw a 404 which can cause unexpected behavior.
Additionally, some of the packages that make use of the @nx/web:file-server were not setting spa and thus deep linking would 404.

Expected Behavior

The spa flag on @nx/web:file-server should correctly redirect to index.html and not throw 404s.
The packages that need spa from @nx/web:file-server should define it in their target, or via their inferred targets.

Related Issue(s)

Fixes #22418
Despite having the ciWebServerCommand set, the serve-static target needs to have spa working correctly.

@Coly010 Coly010 requested review from a team as code owners March 25, 2024 11:29
@Coly010 Coly010 self-assigned this Mar 25, 2024
@Coly010 Coly010 requested review from a team as code owners March 25, 2024 11:29
Copy link

vercel bot commented Mar 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Mar 26, 2024 9:52am

@Coly010 Coly010 merged commit 29c80a3 into nrwl:master Mar 26, 2024
6 checks passed
@Coly010 Coly010 deleted the fix-file-server-spa branch March 26, 2024 16:51
Copy link

github-actions bot commented Apr 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inferred Tasks Not Working after Upgrading Nx
3 participants