forked from Aurory-Game/aurory-ido
-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
40 lines (39 loc) · 1 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
/* eslint-disable @typescript-eslint/no-var-requires */
const { resolve } = require('path')
module.exports = {
trailingSlash: true,
poweredByHeader: false,
reactStrictMode: true,
env: {
NEXT_PUBLIC_VERSION: process.env.VERSION,
NEXT_PUBLIC_NETWORK: process.env.NETWORK,
NEXT_PUBLIC_IDO_START: process.env.IDO_START,
NEXT_PUBLIC_RPC_URL: process.env.RPC_URL,
},
webpack: (config, options) => {
config.module = {
...config.module,
rules: [
...config.module.rules,
{
test: /\.svg$/,
loader: '@svgr/webpack',
},
],
}
// ensure only one react is loaded (mainly for dev)
config.resolve = {
...config.resolve,
alias: {
...config.resolve.alias,
react: resolve('./node_modules/react'),
'react-dom': resolve('./node_modules/react-dom'),
},
}
if (!options.isServer) {
config.resolve.fallback.fs = false
config.resolve.fallback.path = false
}
return config
},
}