-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.ts
42 lines (39 loc) · 1010 Bytes
/
next.config.ts
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
import { withContentCollections } from "@content-collections/next";
import bundleAnalyzer from "@next/bundle-analyzer";
import type { NextConfig } from "next";
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === "true",
});
const nextConfig: NextConfig = {
experimental: {
reactCompiler: true,
},
reactStrictMode: true,
images: {
formats: ["image/avif", "image/webp"],
},
eslint: {
dirs: ["app"],
},
logging: {
fetches: {
fullUrl: true,
},
},
redirects: async () => {
// Redirect old snippet pages
return [
"firebase-authentication-react-hook",
"prettier-config",
"prisma-development",
"serverless-pre-rendering",
"sleep-in-javascript",
"using-clsx-or-classnames-with-tailwind-merge",
].map((slug) => ({
source: `/snippets/${slug}`,
destination: `/blog/${slug}`,
permanent: true,
}));
},
};
export default withContentCollections(withBundleAnalyzer(nextConfig));