-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathnext.config.js
49 lines (46 loc) · 1.13 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
/* eslint-disable @typescript-eslint/no-var-requires */
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
compiler: {
emotion: true,
},
images: {
domains: [
'avatars.githubusercontent.com',
'raw.githubusercontent.com',
'github.com',
],
},
webpack: (config, { defaultLoaders }) => {
config.module.rules.push({
test: /\.(graphql|gql)$/,
exclude: /node_modules/,
loader: 'graphql-tag/loader',
})
config.module.rules.push({
test: /\.svg$/,
use: [
defaultLoaders.babel,
{
loader: '@svgr/webpack',
options: { babel: false },
},
],
})
return config
},
experimental: {
scrollRestoration: true,
},
serverRuntimeConfig: {
HOST: process.env.NEXT_PUBLIC_HOST,
YM_ENABLE: process.env.NEXT_PUBLIC_YANDEX_METRICS_ENABLED,
YM_CODE: process.env.NEXT_PUBLIC_YANDEX_METRICS_CODE,
},
publicRuntimeConfig: {
HOST: process.env.NEXT_PUBLIC_HOST,
YM_ENABLE: process.env.NEXT_PUBLIC_YANDEX_METRICS_ENABLED,
YM_CODE: process.env.NEXT_PUBLIC_YANDEX_METRICS_CODE,
},
}