-
Notifications
You must be signed in to change notification settings - Fork 9
/
next.config.js
85 lines (84 loc) · 2.31 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/** @type {import('next').NextConfig} */
const withBundleAnalyzer = require("@next/bundle-analyzer")();
const { withPlausibleProxy } = require("next-plausible");
const nextConfig = {
reactStrictMode: true,
async redirects() {
return [
{
source: "/insights/how-to-setup-free-postgresql-database-on-railway-app",
destination: "/insights",
permanent: true,
},
{
source: "/insights/redesign-next-js-13-blog-contentlayer-typescript",
destination: "/insights",
permanent: true,
},
{
source: "/posts/how-to-setup-free-postgresql-database-on-railway-app",
destination: "/insights",
permanent: true,
},
{
source: "/info",
destination: "/#info",
permanent: true,
},
{
source: "/posts/how-to-setup-free-postgresql-database-on-railway-app",
destination: "/insights",
permanent: true,
},
{
source: "/posts/rebuilding-blog-nextjs-mdx-tailwindcss",
destination: "/insights",
permanent: true,
},
{
source: "/posts/redesign-next-js-13-blog-contentlayer-typescript",
destination: "/insights",
permanent: true,
},
{
source: "/posts",
destination: "/insights",
permanent: true,
},
{
source: "/posts/from-wordpress-to-jamstack-why-self-taught-devloper-switched",
destination: "/insights",
permanent: true,
},
{
source: "/posts/react-nextjs-developer-tech-stack-tools",
destination: "/insights",
permanent: true,
},
{
source: "/posts/from-wordpress-to-jamstack-why-self-taught-devloper-switched",
destination: "/insights",
permanent: true,
},
{
source: "/insights/2seo-mindset-evolution",
destination: "/insights/seo-mindset-evolution",
permanent: true,
},
];
},
async rewrites() {
return [
{
source: "/js/script.js",
destination: "https://plausible.io/js/script.js",
},
{
source: "/api/event",
destination: "https://plausible.io/api/event",
},
];
},
};
module.exports =
process.env.ANALYZE === "true" ? withPlausibleProxy(withBundleAnalyzer(nextConfig)) : nextConfig;