-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
72 lines (64 loc) · 1.96 KB
/
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
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
const chalk = require("chalk")
const path = require('path');
const isProduction = process.env.NODE_ENV === 'production'
const nextConfig = {
reactStrictMode: true,
generateEtags: false,
compress: false,
productionBrowserSourceMaps: true,
inlineImageLimit: 48, // make it tiny so that it doesn't inline,
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
images: {
disableStaticImages: true, // disable next/image so images are imported properly for `next export`
},
async redirects() {
return [
{
source: '/',
destination: '/deposit',
permanent: false,
}
]
},
publicRuntimeConfig: {
locizeProjectId: process.env.NEXT_PUBLIC_LOCIZE_PROJECT_ID,
locizeApiKey: process.env.NEXT_PUBLIC_LOCIZE_DEV_API_KEY,
locizeVersion: process.env.NEXT_PUBLIC_LOCIZE_VERSION
},
webpack(config, options) {
config.resolve.alias = {
...config.resolve.alias,
'@abis': path.resolve(__dirname, './src/abis'),
'@assets': path.resolve(__dirname, './src/assets'),
'@components': path.resolve(__dirname, './src/components'),
'@constants': path.resolve(__dirname, './src/constants'),
'@hooks': path.resolve(__dirname, './src/hooks'),
'@pages': path.resolve(__dirname, './src/pages'),
'@interfaces': path.resolve(__dirname, './src/interfaces'),
'@utils': path.resolve(__dirname, './src/utils'),
'@views': path.resolve(__dirname, './src/views'),
};
config.module.rules = [
...config.module.rules,
{
test: /\.png/,
type: 'asset/resource'
},
{
test: /\.svg$/,
use: ['@svgr/webpack'],
}
]
return config
}
}
console.log('')
console.log(chalk.green('Using next.js config options:'))
console.log(nextConfig)
console.log('')
module.exports = nextConfig