-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
35 lines (29 loc) · 898 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
const path = require('path')
require('dotenv').config()
const { nextI18NextRewrites } = require('next-i18next/rewrites')
const localeSubpaths = {
hr: 'hr'
}
module.exports = {
rewrites: async () => nextI18NextRewrites(localeSubpaths),
env: {
API_URL: process.env.API_URL,
IMAGES_DOMAIN: process.env.IMAGES_DOMAIN
},
publicRuntimeConfig: {
API_URL: process.env.API_URL,
IMAGES_DOMAIN: process.env.IMAGES_DOMAIN
},
images: {
deviceSizes: [640, 768, 1024, 1280, 1600],
imageSizes: [16, 32, 48, 64, 96],
domains: [process.env.IMAGES_DOMAIN],
path: '/_next/image',
loader: 'default'
},
webpack: config => {
config.resolve.alias['components'] = path.join(__dirname, 'components')
config.resolve.alias['public'] = path.join(__dirname, 'public')
return config
}
}