-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnext.config.js
64 lines (63 loc) · 1.59 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
const {i18n} = require('./next-i18next.config.js');
module.exports = {
webpack: (config, {buildId, dev, isServer, defaultLoaders, webpack})=>{
config.optimization.minimize = false;
config.module.rules.push({
test: /\.svg$/,
issuer: {test: /\.jsx?$/},
use: ['@svgr/webpack'],
});
if (!isServer)
{
config.target = 'web';
config.resolve.alias.hyperswarm = 'hyperswarm-web';
}
return config;
},
i18n,
async headers(){
return [
{
source: '/:all*(svg|jpg|png)',
locale: false,
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=9999999999, must-revalidate',
}
],
}, {
source: '/api/israeltomorrow_save_email',
headers: [
{
key: 'Access-Control-Allow-Origin',
value: 'https://israeltomorrow.co.il',
}
],
}, {
source: '/api/israeltomorrow_log_visit',
headers: [
{
key: 'Access-Control-Allow-Origin',
value: 'https://israeltomorrow.co.il',
}
],
},
];
},
async redirects(){
return [{
source: '/en/faq',
destination: 'https://docs.google.com/document/d/'+
'1tkTka-vapUyiO4svCNwdwPBAZ7k6SAMjMsP9Jukff7g/edit',
statusCode: 302,
locale: false,
}, {
source: '/he/faq',
destination: 'https://docs.google.com/document/d/'+
'1nQoDXB4f1kiayTTBz72DfpU4SRX3aPWeSWXZt9A4UwQ/edit',
statusCode: 302,
locale: false,
}];
},
};