-
Notifications
You must be signed in to change notification settings - Fork 83
/
next.config.js
41 lines (38 loc) · 1.12 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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withContentlayer } = require('next-contentlayer')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
/**
* @type {import('next/dist/next-server/server/config').NextConfig}
**/
module.exports = () => {
const plugins = [withContentlayer, withBundleAnalyzer]
return plugins.reduce((acc, next) => next(acc), {
optimizeFonts: true,
images: {
domains: [
'avatars.githubusercontent.com',
'avatars0.githubusercontent.com',
'avatars1.githubusercontent.com',
'avatars2.githubusercontent.com',
'avatars3.githubusercontent.com',
'github.com',
'img.youtube.com',
'raw.githubusercontent.com',
'res.cloudinary.com',
],
},
productionBrowserSourceMaps: true,
redirects: require('./next-redirect'),
reactStrictMode: true,
output: 'standalone',
webpack: (config, options) => {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
})
return config
},
})
}