-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
119 lines (118 loc) · 3.14 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
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
const MomentTimezoneDataPlugin = require('moment-timezone-data-webpack-plugin')
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
// Add redirects to netlify.toml - netlify doesn't seem to pick up next.config.js redirects
redirects: () => {
return [
{
source: '/host',
destination: 'https://ef-events.notion.site/Host-an-event-at-Devconnect-8d1c95ea7f4f41d9a4239eb87ed1fb03',
permanent: false,
},
{
source: '/istanbul',
destination: 'https://devconnect.org/schedule',
permanent: false,
},
{
source: '/schedule/istanbul',
destination: 'https://devconnect.org/schedule',
permanent: false,
},
{
source: '/schedule/amsterdam',
destination: 'https://devconnect.org/amsterdam',
permanent: false,
},
]
},
images: {
domains: [
'speak.devcon.org',
'storage.googleapis.com',
'avatars.githubusercontent.com',
'camo.githubusercontent.com',
'blog.ethereum.org',
'img.youtube.com',
'www.gravatar.com',
],
},
webpack: (config, { webpack }) => {
return {
...config,
plugins: [
// Only include tz data for the zone we use
new MomentTimezoneDataPlugin({
matchZones: /^Europe\/Istanbul/,
}),
new webpack.DefinePlugin({
devMode: process.env.NODE_ENV !== 'production',
}),
...config.plugins,
],
module: {
...config.module,
rules: [
{
test: /\.svg$/,
exclude: /icons/,
use: [
{
loader: '@svgr/webpack',
options: {
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
},
},
},
],
},
},
},
],
},
{
test: /\.svg$/,
include: /icons/,
issuer: { not: /\.(css|scss|sass)$/ },
use: [
{
loader: '@svgr/webpack',
options: {
icon: true,
svgProps: {
className: 'icon',
},
svgoConfig: {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
removeViewBox: false,
},
},
},
],
},
},
},
],
},
{
test: /\.(glsl|vs|fs|vert|frag)$/,
exclude: /node_modules/,
use: ['raw-loader', 'glslify-loader'],
},
...config.module.rules,
],
},
}
},
}