-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnext.config.js
63 lines (58 loc) · 1.68 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
/* eslint-disable @typescript-eslint/no-var-requires */
const withPlugins = require('next-compose-plugins')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const withLess = require('next-with-less')
module.exports = withPlugins(
[
[withBundleAnalyzer],
[
withLess,
{
lessLoaderOptions: {
/* ... */
lessOptions: {
/* ... */
modifyVars: {
'primary-color': '#237f61',
'border-radius-base': '2px',
'info-color': '#7ea695',
'text-selection-bg': '#7ea695',
'link-focus-outline': 'auto',
'text-color': '#333', // major text color
'font-family':
"'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji','Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'",
'code-family':
"'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",
/* ... */
},
},
},
lessOptions: {
/* ... */
},
},
],
],
{
pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'],
images: {
formats: ['image/avif', 'image/webp'],
domains: ['i.scdn.co'],
},
webpack5: true,
swcMinify: true,
experimental: {
// concurrentFeatures: true,
// serverComponents: true,
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack'],
})
return config
},
},
)