-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
48 lines (44 loc) · 1.3 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
const withSass = require('@zeit/next-sass')
module.exports = withSass({
cssModules: true,
webpack: (config) => {
config.module.rules.push({
test: /\.svg$/,
use: [
{
loader: 'babel-loader'
},
{
loader: 'react-svg-loader',
options: {
jsx: true // true outputs JSX tags
}
}
]
})
// Fixes npm packages that depend on `fs` module
config.node = {
fs: 'empty'
}
config.plugins = config.plugins || []
config.plugins = [...config.plugins]
return config
},
target: 'serverless',
env: {
// Reference a variable that was defined in the .env file and make it available at Build Time
RECAPTCHA_SITE_KEY:
process.env.NODE_ENV === 'production'
? '6LfhKr0UAAAAADAT97B4cfqmhpYNd4xgq0LyXLZC'
: '6Lfzir0UAAAAAO_GnwyXOTLpzLaHvZvF30oAJzI_',
API_HOST:
process.env.NODE_ENV === 'production'
? 'https://api.flossbank.com'
: 'https://api.flossbank.io',
STAGING_API_HOST: 'https://api.flossbank.io',
NEXT_PUBLIC_STRIPE_KEY: process.env.NODE_ENV === 'production'
? 'pk_live_KSFYqPCzV6zNSzDyYlIijaiI00v7UCvGGS'
: 'pk_test_Kz9yyhpVG7OVp9ejZChlxUKw00ccsj7tcR',
GOAT_COUNTER_ENABLE: process.env.NODE_ENV === 'production'
}
})