-
Notifications
You must be signed in to change notification settings - Fork 2
/
next.config.js
44 lines (38 loc) · 1.08 KB
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
appDir: true,
serverActions: true,
serverComponentsExternalPackages: ['shiki', 'vscode-oniguruma', 'vscode-textmate'],
},
staticPageGenerationTimeout: 1000,
async rewrites() {
return [
{
// Rewrite /packages/petstore2/openapi.json to /api/packages/petstore2/openapi
source: '/packages/:package/openapi.json',
destination: '/api/packages/:package/openapi',
},
{
// Rewrite /packages/petstore2/openapi.json to /api/packages/petstore2/openapi
source: '/packages/:package/openapi.yaml',
destination: '/api/packages/:package/openapi',
},
{
source: '/packages/:package/ai-plugin.json',
destination: '/api/packages/:package/ai-plugin',
},
// Rewrite /packages to /apis
{
source: '/apis',
destination: '/packages',
},
{
source: '/apis/:path*',
destination: '/packages/:path*',
},
]
},
}
module.exports = nextConfig