-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathnext.config.ts
More file actions
49 lines (39 loc) · 1.03 KB
/
Copy pathnext.config.ts
File metadata and controls
49 lines (39 loc) · 1.03 KB
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
import bundleAnalyzer from '@next/bundle-analyzer';
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
reactStrictMode: true,
reactCompiler: true,
output: process.env.NEXT_OUTPUT as NextConfig['output'],
devIndicators: false,
poweredByHeader: false,
experimental: {
optimizePackageImports: ['@chakra-ui/react'],
},
async redirects() {
return [
{
source: '/:place/loadouts',
destination: '/:place',
permanent: false,
},
];
},
assetPrefix: process.env.ASSET_PREFIX,
images: {
unoptimized: process.env.NODE_ENV === 'development',
loader: process.env.NEXT_PUBLIC_IMAGE_LOADER ? 'custom' : 'default',
loaderFile: process.env.NEXT_PUBLIC_IMAGE_LOADER
? './src/images.js'
: undefined,
remotePatterns: [
{
protocol: 'https',
hostname: '*.astrid.ovh',
},
],
},
};
const withBundleAnalyzer = bundleAnalyzer({
enabled: process.env.ANALYZE === 'true',
});
export default withBundleAnalyzer(nextConfig);