-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
32 lines (30 loc) · 1.13 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
const path = require('path')
const withCSS = require('@zeit/next-css')
const withSASS = require('@zeit/next-sass')
const webpackMerge = require('webpack-merge')
const defaultEnv = {
API_ENDPOINT: "https://staging-api.gamejitsu.io",
SOCKET_ENDPOINT: "wss://staging-api.gamejitsu.io",
STRIPE_PUBLIC_KEY: "pk_test_gO4hZHVOjk7E3GjH0etoiBAO00c0qpfX0m",
GOOGLE_RECAPTCHA_PUBLIC_KEY: "6LclgLkZAAAAAKwkD9aCAi3QivbwAwHm6HvRoJDv"
}
module.exports = withCSS(withSASS({
cssLoaderOptions: { url: false },
env: {
API_ENDPOINT: process.env.API_ENDPOINT || defaultEnv.API_ENDPOINT,
SOCKET_ENDPOINT: process.env.SOCKET_ENDPOINT || defaultEnv.SOCKET_ENDPOINT,
STRIPE_PUBLIC_KEY: process.env.STRIPE_PUBLIC_KEY || defaultEnv.STRIPE_PUBLIC_KEY,
GOOGLE_RECAPTCHA_PUBLIC_KEY: process.env.GOOGLE_RECAPTCHA_PUBLIC_KEY || defaultEnv.GOOGLE_RECAPTCHA_PUBLIC_KEY
},
webpack(config) {
return webpackMerge(config, {
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
alias: {
customUtils: path.resolve(__dirname, 'lib/utils/'),
gamejitsu: path.resolve(__dirname, 'lib/'),
}
}
})
}
}))