-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnext.config.mjs
More file actions
60 lines (57 loc) · 1.47 KB
/
next.config.mjs
File metadata and controls
60 lines (57 loc) · 1.47 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import path from 'path'
import createMDX from '@next/mdx'
/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
return [
{
source: "/app/:id([a-z0-9_-]+)",
destination: "https://carmel-app-:id.vercel.app/app/:id/home"
},
{
source: "/app/:id([a-z0-9_-]+)/",
destination: "https://carmel-app-:id.vercel.app/app/:id/home"
},
{
source: "/app/:id([a-z0-9_-]+)/:path*",
destination: "https://carmel-app-:id.vercel.app/app/:id/:path*"
},
{
source: "/agent/:path*",
destination: "https://carmel-agent-main.vercel.app/agent/:path*"
}
]
},
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
transpilePackages: ["@carmel/core"],
webpack(webpackConfig) {
console.log(path.resolve("./node_modules/@carmel/core"))
webpackConfig.resolve.alias["@carmel/core"] = path.resolve("./node_modules/@carmel/core");
return {
...webpackConfig,
}
},
reactStrictMode: true,
trailingSlash: true,
images: {
unoptimized: true,
remotePatterns: [
{
protocol: 'https',
hostname: 'storage.googleapis.com',
port: '',
pathname: '/*/**',
},
{
protocol: 'https',
hostname: 'files.carmel.city',
port: '',
pathname: '/*/**',
},
],
},
};
const withMDX = createMDX({
// Add markdown plugins here, as desired
})
export default withMDX(nextConfig)