-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
55 lines (51 loc) · 1.46 KB
/
next.config.js
File metadata and controls
55 lines (51 loc) · 1.46 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
/** @type {import('next').NextConfig} */
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { withImageLoader } = require('next-image-loader')
const nextConfig = {
compiler: {
styledComponents: true
},
reactStrictMode: true,
swcMinify: true,
images: {
domains: ['65a421068abcad9d7994.ucr.io/'],
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;"
},
async rewrites() {
return [
{
source: '/api/stores/:id',
destination: `${process.env.API_DOMAIN}/stores/:id`
},
{
source: '/api/stores/:id/detail-review-score',
destination: `${process.env.API_DOMAIN}/stores/:id/detail-review-score`
},
{
source: '/api/web/recommendations',
destination: `${process.env.API_DOMAIN}/web/recommendations`
},
{
source: '/api/web/stores/:storeId/recommendations',
destination: `${process.env.API_DOMAIN}/web/stores/:storeId/recommendations`
},
{
source: '/api/web/stores/:storeId/near-stores',
destination: `${process.env.API_DOMAIN}/web/stores/:storeId/near-stores`
},
{
source: '/api/web/:path*',
destination: `${process.env.API_DOMAIN}/web/:path*`
}
]
},
webpack(config) {
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack']
})
return config
}
}
module.exports = withImageLoader(nextConfig)