-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
37 lines (35 loc) · 959 Bytes
/
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
module.exports = {
async rewrites() {
return [
{
source: '/js/t.js',
destination: 'https://count.reiner.info/tracker.js'
},
{
source: '/ackee/api',
destination: 'https://count.reiner.info/api'
}
];
},
async redirects() {
return [
{
source: '/',
destination: 'https://www.philippreiner.com',
permanent: true,
},
]
},
swcMinify: true,
webpack: (config, { dev, isServer }) => {
// Replace React with Preact only in client production build
if (!dev && !isServer) {
Object.assign(config.resolve.alias, {
react: 'preact/compat',
'react-dom/test-utils': 'preact/test-utils',
'react-dom': 'preact/compat',
});
}
return config;
},
}