Skip to content

Commit 57cd267

Browse files
committed
Fix rewrites
1 parent 24e3472 commit 57cd267

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

apps/studio/next.config.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ module.exports = withPlugins([
1919
skipWaiting: true,
2020
},
2121

22-
rewrites: [
23-
{
24-
source: '/:path*',
25-
destination: `/:path*`,
26-
},
27-
28-
{
29-
"__comment": "This will only be ran on dev. Production will use the vercel.json rewrites",
30-
source: '/docs',
31-
destination: `http://localhost:3001/docs`,
32-
},
33-
{
34-
source: '/docs/:path*',
35-
destination: `http://localhost:3001/docs/:path`,
36-
},
37-
]
22+
async rewrites() {
23+
return [
24+
{
25+
source: '/:path*',
26+
destination: `/:path*`,
27+
},
3828

29+
{
30+
source: '/docs',
31+
destination: `http://localhost:3001/docs`,
32+
},
33+
{
34+
source: '/docs/:path*',
35+
destination: `http://localhost:3001/docs/:path*`,
36+
},
37+
]
38+
},
3939
})

apps/studio/vercel.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
{
77
"source": "/docs",
88
"destination": "https://dumbcode-studio-docs.vercel.app/docs"
9+
},
10+
{
11+
"source": "/docs/:path*",
12+
"destination": "https://dumbcode-studio-docs.vercel.app/docs/:path*"
913
}
1014
]
1115
}

0 commit comments

Comments
 (0)