-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
40 lines (36 loc) · 1.39 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
const path = require('path')
const pkgjson = require('./package.json')
const webpack = (config) => {
const adjustedConf = { ...config }
const experiments = config.experiments || {}
adjustedConf.experiments = { ...experiments, syncWebAssembly: true }
adjustedConf.resolve.alias = {
...config.resolve.alias,
react: path.resolve('./node_modules/react'),
'react-dom': path.resolve('./node_modules/react-dom'),
next: path.resolve('./node_modules/next'),
'styled-components': path.resolve('./node_modules/styled-components')
}
return adjustedConf
}
module.exports = () => {
return {
trailingSlash: true,
webpack,
env: {
NEXT_PUBLIC_PACKAGE_NAME: pkgjson.name,
NEXT_PUBLIC_PACKAGE_VERSION: pkgjson.version,
NEXT_PUBLIC_HOME_URL: process.env.HOME_URL || 'https://glif.io',
NEXT_PUBLIC_BLOG_URL: process.env.BLOG_URL || 'https://blog.glif.io/',
NEXT_PUBLIC_WALLET_URL:
process.env.WALLET_URL || 'https://wallet-calibration.glif.link',
NEXT_PUBLIC_SAFE_URL:
process.env.SAFE_URL || 'https://safe-calibration.glif.link',
NEXT_PUBLIC_EXPLORER_URL:
process.env.EXPLORER_URL || 'https://explorer-calibration.glif.link',
NEXT_PUBLIC_VERIFIER_URL:
process.env.VERIFIER_URL || 'https://verify-calibration.glif.link',
NEXT_PUBLIC_NODE_URL: process.env.NODE_URL || 'https://api.node.glif.io'
}
}
}