Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Redirect all routes to a single page with some exception

Aperta
#71 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
backend, web-dev

Direzione di ricerca

The issue points to src/index.js#L94; start there and trace how each rewrite is applied to the path, then inspect the minimatch patterns used by the rewrites configuration. Done means establishing a supported way for the two prerendered paths to bypass the catch-all index.html rewrite, with behavior verified against the rewrite handling.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In a SPA settings, I'm prerendering the some landing pages for SEO and perf. But I can't figure out the corresponding rewrites rules.

So far, I've tried:

{
	"rewrites": [
		{ "source": "", "destination": "prerender/landing.html" },
		{
			"source": "/landing-2",
			"destination": "prerender/landing-2.html"
		},
		{ "source": "**", "destination": "index.html" }
	],
...
}

This doesn't work because apparently, all the rewrites rules are applied to the path (instead of stopping after the first match).

The problem is that I can't seem to find a way to negate the two prerendered path in the last rule, using minimatch.

What would be the proper way to handle this use case ? Is it even possible ?

Thanks!

Lingua principale
JavaScript
Stelle
618
Fork
117
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di vercel/serve-handler

Tutte le issue di vercel/serve-handler

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.