Skip to content

Commit c62b2f2

Browse files
authored
Refactor routing rules in vercel.json
Signed-off-by: Aviv Keller <me@aviv.sh>
1 parent dcc2661 commit c62b2f2

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

vercel.json

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,13 @@
1414
"permanent": true
1515
},
1616
{
17-
"source": "/learn/diagnostics/live-debugging",
18-
"destination": "/learn/diagnostics/live-debugging/",
17+
"source": "/learn/diagnostics/:page(live-debugging|memory|poor-performance)",
18+
"destination": "/learn/diagnostics/:page/",
1919
"permanent": true
2020
},
2121
{
22-
"source": "/learn/diagnostics/memory",
23-
"destination": "/learn/diagnostics/memory/",
24-
"permanent": true
25-
},
26-
{
27-
"source": "/learn/diagnostics/poor-performance",
28-
"destination": "/learn/diagnostics/poor-performance/",
29-
"permanent": true
30-
},
31-
{
32-
"source": "/learn/(.*)/",
33-
"destination": "/learn/$1",
22+
"source": "/learn/:path((?!diagnostics/live-debugging/?$|diagnostics/memory/?$|diagnostics/poor-performance/?$).+)/",
23+
"destination": "/learn/:path",
3424
"permanent": true
3525
}
3626
],

0 commit comments

Comments
 (0)