-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
35 lines (30 loc) · 1.01 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
require('dotenv').config()
const path = require('path')
const Dotenv = require('dotenv-webpack')
module.exports = {
serverRuntimeConfig: {
NODE_ENV: process.env.NODE_ENV || 'development',
OSM_HYDRA_ID: process.env.OSM_HYDRA_ID || 'manage',
OSM_HYDRA_SECRET: process.env.OSM_HYDRA_SECRET || 'manage-secret',
OSM_CONSUMER_KEY: process.env.OSM_CONSUMER_KEY,
OSM_CONSUMER_SECRET: process.env.OSM_CONSUMER_SECRET,
HYDRA_TOKEN_URL: process.env.HYDRA_TOKEN_URL || 'http://localhost:4444',
HYDRA_AUTHZ_URL: process.env.HYDRA_AUTHZ_URL || 'http://localhost:4444',
HYDRA_ADMIN_URL: process.env.HYDRA_ADMIN_URL || 'http://localhost:4445'
},
publicRuntimeConfig: {
APP_URL: process.env.APP_URL || 'http://localhost:8989'
},
webpack: (config) => {
config.plugins = config.plugins || []
config.plugins = [
...config.plugins,
// Read the .env file
new Dotenv({
path: path.join(__dirname, '.env'),
systemvars: true
})
]
return config
}
}