fix(cart): force root redirect to products site and add cart link to header - #479
Draft
FrozenPandaz wants to merge 1 commit into
Draft
fix(cart): force root redirect to products site and add cart link to header#479FrozenPandaz wants to merge 1 commit into
FrozenPandaz wants to merge 1 commit into
Conversation
…header - Force the / redirect in _redirects with 301! so Netlify doesn't shadow it with the published index.html (the cart site root was rendering a blank page instead of redirecting) - Add a cart icon link to the shared header on both apps - Mirror the Netlify redirects locally with dev-server proxies so cross-app links work when serving both apps - Add serve-with-deps targets to start both dev servers with one command
✅ Deploy Preview for nrwl-nx-examples-dep-graph ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx-cloud record -- nx format:check --base=bea3c... |
❌ Failed | 1s | View ↗ |
☁️ Nx Cloud last updated this comment at 2026-07-13 21:24:49 UTC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
https://nrwl-nx-examples-cart.netlify.app/ renders a blank page (header only). The
/ → products siterule in_redirectshas been shadowed since it was added (#73): Netlify skips non-forced redirects when a file exists at the requested path, and/matches the publishedindex.html.There was also no way to navigate from the products site to the cart.
Changes
301!inapps/cart/src/_redirectsso the cart site root redirects to the products site instead of serving a blank SPA shellcart.svg, Material Design glyph) linking to/cart, witharia-labeland a unit test. On the products site Netlify already 301s/cartto the cart site/cart,/static,/rsbuild-hmr→ cart (4201)serve-with-depstargets on both apps (dependsOn: ["serve", "<other>:serve"]) so one command starts both dev serversVerification
shared-headerunit tests pass; both apps build4200/,4200/cart,4201/,4201/cart,4201/product/1all serve the right app with working linksView session information ↗