Skip to content

add: fallback spa para netlify - #5

Merged
NachoBasilio merged 1 commit into
devfrom
fix/netlify-spa-redirect
May 17, 2026
Merged

NachoBasilio merged 1 commit into
devfrom
fix/netlify-spa-redirect

Conversation

@NachoBasilio

Copy link
Copy Markdown
Contributor

¿Qué hace este PR?

Agrega el fallback de SPA para Netlify y evita que al recargar rutas como /catalogo aparezca el 404 propio de Netlify.

¿Por qué?

La app usa React Router con createBrowserRouter; las rutas existen del lado del cliente, pero Netlify necesita servir index.html para deep links.

Cambios incluidos

  • Agrega public/_redirects con /* /index.html 200.

Cómo probarlo

  1. Deployar la rama en Netlify.
  2. Entrar a /catalogo.
  3. Recargar la página y verificar que responde la app, no el 404 de Netlify.

Checklist

  • pnpm lint pasa sin errores
  • pnpm test --run pasa sin errores
  • No hay console.log de debug
  • Los componentes nuevos tienen test — no aplica, no se agregaron componentes

Validación adicional:

  • pnpm typecheck pasa sin errores

@netlify

netlify Bot commented May 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for musical-cucurucho-b52132 ready!

Name Link
🔨 Latest commit 542e023
🔍 Latest deploy log https://app.netlify.com/projects/musical-cucurucho-b52132/deploys/6a0a4bba52f8250008ea3321
😎 Deploy Preview https://deploy-preview-5--musical-cucurucho-b52132.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@NachoBasilio NachoBasilio added the bug Something isn't working label May 17, 2026
@NachoBasilio
NachoBasilio merged commit dc663f3 into dev May 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant