-
-
Notifications
You must be signed in to change notification settings - Fork 268
Expand file tree
/
Copy pathnext.config.ts
More file actions
80 lines (74 loc) · 2 KB
/
next.config.ts
File metadata and controls
80 lines (74 loc) · 2 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
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
import type { NextConfig } from 'next';
import { withSentryConfig } from '@sentry/nextjs';
import bundleAnalyzer from '@next/bundle-analyzer';
import { svgoConfig } from './src/common/config/svgo';
const hasBundleAnalyzer = process.env.ANALYZE === 'true';
const withBundleAnalyzer = bundleAnalyzer({ enabled: hasBundleAnalyzer });
const jsonSvgoConfig = JSON.parse(JSON.stringify(svgoConfig));
const nextConfig: NextConfig = {
turbopack: {
rules: {
'*.svg': {
loaders: [
{
loader: '@svgr/webpack',
options: {
svgo: jsonSvgoConfig,
},
},
],
as: '*.js',
},
},
},
images: {
localPatterns: [{ pathname: '/**' }],
remotePatterns: [
{ protocol: 'https', hostname: 'operation-code-assets.s3.us-east-2.amazonaws.com' },
{ protocol: 'https', hostname: 'user-images.githubusercontent.com' },
{ protocol: 'https', hostname: 'ssl-static.libsyn.com' },
{ protocol: 'https', hostname: 'static.libsyn.com' },
{ protocol: 'https', hostname: 'libsyn.com' },
{ protocol: 'https', hostname: 'i.ytimg.com' },
],
},
async rewrites() {
return [
{
source: '/media',
destination: '/branding',
},
{
source: '/privacy',
destination: 'https://www.iubenda.com/privacy-policy/8174861',
},
];
},
async redirects() {
return [
{
source: '/who_we_serve',
destination: '/services',
permanent: true,
},
{
source: '/swag',
destination: 'https://operationcode.threadless.com/',
permanent: true,
},
{
source: '/store',
destination: 'https://operationcode.threadless.com/',
permanent: true,
},
{
source: '/shop',
destination: 'https://operationcode.threadless.com/',
permanent: true,
},
];
},
};
export default withSentryConfig(withBundleAnalyzer(nextConfig), {
silent: true,
});