-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnext.config.ts
More file actions
54 lines (50 loc) · 1.17 KB
/
Copy pathnext.config.ts
File metadata and controls
54 lines (50 loc) · 1.17 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
import withVercelToolbar from "@vercel/toolbar/plugins/next";
import type { NextConfig } from "next";
/** @type {import('next').NextConfig} */
const nextConfig: NextConfig = {
cacheComponents: true,
experimental: {
turbopackFileSystemCacheForDev: true,
},
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
turbopack: {
rules: {
"*.mdx": {
loaders: ["turbopack-mdx-loader"],
as: "*.tsx",
},
},
},
// temporary redirect for any old, lingering urls
async redirects() {
return [
{
source: "/about",
destination: "/",
permanent: true,
},
{
source: "/experience/:path*",
destination: "/",
permanent: true,
},
{
source: "/blog/posts/:path*",
destination: "/writing/:path*",
permanent: true,
},
{
source: "/blog",
destination: "/archive",
permanent: true,
},
{
source: "/blog/tags/:path*",
destination: "/archive",
permanent: true,
},
];
},
};
const configWithVercelToolbar = withVercelToolbar()(nextConfig);
export default configWithVercelToolbar;