-
Notifications
You must be signed in to change notification settings - Fork 20
/
next.config.js
46 lines (42 loc) · 1.03 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
// @ts-check
const packageJson = require('./package.json')
const LOCALHOST_URL = `http://localhost:${process.env.PORT || 3000}`
/**
* @type {import("next").NextConfig}
* @see https://nextjs.org/docs/api-reference/next.config.js/introduction
*/
const nextConfig = {
env: {
APP_VERSION: packageJson.version,
NEXT_PUBLIC_WEBSITE_URL:
process.env.NODE_ENV === 'development' ? LOCALHOST_URL : process.env.NEXT_PUBLIC_WEBSITE_URL,
},
reactStrictMode: true,
trailingSlash: true,
webpack(config, { dev, webpack }) {
// svgr integration
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
use: ['@svgr/webpack'],
})
// predefined constants
config.plugins.push(
new webpack.DefinePlugin({
__DEV__: dev,
__PROD__: !dev,
}),
)
return config
},
async redirects() {
return [
{
source: '/airdrops/:address/manage',
destination: '/airdrops/manage',
permanent: true,
},
]
},
}
module.exports = nextConfig