generated from BinPar/bpt-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
49 lines (47 loc) · 1019 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
38
39
40
41
42
43
44
45
46
47
48
49
/** @type {import('next').NextConfig} */
const isProd = process.env.NODE_ENV === 'production';
module.exports = {
reactStrictMode: true,
webpack: (config, options) => {
config.module.rules.push({
test: /\.(glsl|vs|fs|vert|frag)$/,
use: ['raw-loader', 'glslify-loader'],
});
return config;
},
i18n: {
locales: ['es', 'en'],
defaultLocale: 'es',
localeDetection: true,
},
images: isProd
? {
minimumCacheTTL: 60 * 60 * 24, // One day in seconds
}
: undefined,
compress: true,
async rewrites() {
return [
{
source: '/robots.txt',
destination: '/api/robots',
},
{
source: '/healthcheck',
destination: '/api/healthcheck',
},
{
source: '/sitemap',
destination: '/api/sitemap',
},
{
source: '/sitemap.xml',
destination: '/api/sitemap',
},
{
source: '/metrics',
destination: '/api/metrics',
}
];
},
};