-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.mjs
127 lines (121 loc) · 3.11 KB
/
next.config.mjs
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import createMDX from '@next/mdx'
import remarkFrontmatter from 'remark-frontmatter'
import remarkMdxFrontmatter from 'remark-mdx-frontmatter'
/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
// Production optimizations
productionBrowserSourceMaps: false,
compiler: {
removeConsole: process.env.NODE_ENV === 'production'
},
experimental: {
optimizeCss: true,
optimizePackageImports: ['lucide-react']
},
// Image optimization settings
images: {
formats: ['image/webp', 'image/avif'],
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
},
async redirects() {
return [
{
source: '/ads.txt',
destination: 'https://ads.adthrive.com/sites/67aceaec554bb80802312182/ads.txt',
permanent: true, // 301 status code
},
{
source: '/howitworks',
destination: '/about',
permanent: true, // 308 status code
},
{
source: '/cg-lite',
destination: '/porosity/low-porosity',
permanent: true, // 308 status code
},
{
source: '/groups/detergents',
destination: '/groups/surfactants',
permanent: true, // 308 status code
},
{
source: '/cleansers',
destination: '/groups/surfactants',
permanent: true, // 308 status code
},
{
source: '/high-porosity',
destination: '/porosity/high-porosity',
permanent: true,
},
{
source: '/normal-porosity',
destination: '/porosity/normal-porosity',
permanent: true,
},
{
source: '/curly-girl-ingredient-list',
destination: '/ingredients-cheat-sheet',
permanent: true,
},
{
source: '/dye',
destination: '/blog/curl-friendly-hair-dye',
permanent: true,
},
{
source: '/harder-water',
destination: '/blog/curly-hair-hard-water',
permanent: true,
},
{
source: '/shampoo-bars-are-not-cg',
destination: '/categories/soaps',
permanent: true,
},
{
source: '/blog/is-soap-good-for-curls',
destination: '/categories/soaps',
permanent: true,
},
{
source: '/shea',
destination: '/blog/is-shea-moisture-curl-friendly',
permanent: true,
},
{
source: '/porosity',
destination: '/porosity-quiz',
permanent: true,
},
{
source: '/groups',
destination: '/categories',
permanent: true,
},
{
source: '/categories/humectants',
destination: '/groups/humectants',
permanent: true,
},
{
source: '/categories/petroleum-oils',
destination: '/groups/oils',
permanent: true,
},
];
},
}
const withMDX = createMDX({
options: {
remarkPlugins: [
remarkFrontmatter,
[remarkMdxFrontmatter, { name: 'frontmatter', exported: true }]
],
rehypePlugins: [],
},
})
export default withMDX(nextConfig)