-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnext.config.mjs
More file actions
70 lines (67 loc) · 1.6 KB
/
next.config.mjs
File metadata and controls
70 lines (67 loc) · 1.6 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
/** @type {import('next').NextConfig} */
const nextConfig = {
transpilePackages: ['msw'],
sassOptions: {
includePaths: ['./shared/styles'],
prependData: `
@import "@/shared/styles/base/variables";
@import "@/shared/styles/base/mixins";
@import "@/shared/styles/base/functions";
`,
},
async rewrites() {
return [
{
source: '/api/users/:path*',
destination: 'http://15.164.90.102:8081/api/users/:path*',
},
{
source: '/login',
destination: 'http://15.164.90.102:8081/login',
},
{
source: '/api/:path*',
destination: 'http://15.164.90.102:8081/api/:path*',
},
]
},
webpack: (config, { isServer }) => {
if (isServer) {
if (Array.isArray(config.resolve.alias)) {
config.resolve.alias.push({ name: 'msw/browser', alias: false })
} else {
config.resolve.alias['msw/browser'] = false
}
} else {
if (Array.isArray(config.resolve.alias)) {
config.resolve.alias.push({ name: 'msw/node', alias: false })
} else {
config.resolve.alias['msw/node'] = false
}
}
config.module.rules.push({
test: /\.svg$/,
issuer: /\.[jt]sx?$/,
use: [
{
loader: '@svgr/webpack',
options: {
dimensions: false,
},
},
],
})
return config
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'fastcampus-team3.s3.ap-northeast-2.amazonaws.com',
port: '',
pathname: '/**',
},
],
},
}
export default nextConfig