-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
64 lines (60 loc) · 2.12 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
// https://github.com/facebookexperimental/Recoil/issues/733
const intercept = require('intercept-stdout')
intercept((text) => (text.includes('Duplicate atom key') ? '' : text))
const { PLAYDUST_API_HOST } = process.env
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
modularizeImports: {
"@mui/material": {
transform: "@mui/material/{{member}}",
},
'@mui/icons-material/?(((\\w*)?/?)*)': {
transform: '@mui/icons-material/{{ matches.[1] }}/{{member}}',
},
},
},
webpack: (config, { webpack }) => {
config.plugins.push(
new webpack.DefinePlugin({
'process.env.PD_ENV': JSON.stringify(process.env.PD_ENV),
'process.env.RPC_NODE_CLUSTER': JSON.stringify(process.env.RPC_NODE_CLUSTER),
'process.env.RPC_NODE_URL': JSON.stringify(process.env.RPC_NODE_URL),
'process.env.WHITELIST_ACTIVE': JSON.stringify(process.env.WHITELIST_ACTIVE || false),
'process.env.HUBSPOT_PORTAL_ID': JSON.stringify(process.env.HUBSPOT_PORTAL_ID),
'process.env.HUBSPOT_JOIN_WHITELIST_FORM_ID': JSON.stringify(process.env.HUBSPOT_JOIN_WHITELIST_FORM_ID),
'process.env.GO_LIVE': JSON.stringify(process.env.GO_LIVE),
'process.env.GOOGLE_ANALYTICS_4_MEASUREMENT_ID': JSON.stringify(process.env.GOOGLE_ANALYTICS_4_MEASUREMENT_ID),
})
);
return config;
},
rewrites: async () => [
{
source: '/cdn/:path*',
destination: 'https://bix5os3dh6.execute-api.us-east-1.amazonaws.com/prod/3:path*',
},
{
source: '/playdust-api/:path*',
destination: `${PLAYDUST_API_HOST}/:path*`,
},
],
ignoreDuringBuilds: true,
typescript: {
tsconfigPath: "tsconfig.json",
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
env: {
OPENSEARCH_URL: process.env.OPENSEARCH_URL,
OPENSEARCH_USER: process.env.OPENSEARCH_USER,
OPENSEARCH_PASSWORD: process.env.OPENSEARCH_PASSWORD,
}
}
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
module.exports = withBundleAnalyzer(nextConfig)