-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
49 lines (47 loc) · 1.02 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
const path = require('path');
const { withContentlayer } = require('next-contentlayer2');
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
// experimental: {
// reactCompiler: true,
// },
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
images: {
remotePatterns: [
{
protocol: 'http',
hostname: '**',
},
{
protocol: 'https',
hostname: '**',
},
],
formats: ['image/webp'],
},
headers: async function headers() {
if (process.env.NODE_ENV === 'development') return [];
return [
{
source: '/:all*(svg|jpg|jpeg|png|webp|avif|otf|woff2)',
locale: false,
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=9999999999, must-revalidate',
},
],
},
];
},
};
module.exports = withContentlayer(nextConfig);