forked from PokemonGo-Enhanced/Enhanced-Frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenvironments.js
44 lines (43 loc) · 1.5 KB
/
environments.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
// Here is where you can define configuration overrides based on the execution environment.
// Supply a key to the default export matching the NODE_ENV that you wish to target, and
// the base configuration will apply your overrides before exporting itself.
module.exports = {
// ======================================================
// Overrides when NODE_ENV === 'development'
// ======================================================
// NOTE: In development, we use an explicit public path when the assets
// are served webpack by to fix this issue:
// http://stackoverflow.com/questions/34133808/webpack-ots-parsing-error-loading-fonts/34133809#34133809
development: (config) => ({
compiler_public_path: `http://${config.server_host}:${config.server_port}/`,
compiler_devtool: 'cheap-module-eval-source-map',
proxy: {
enabled: true,
options: {
host: 'http://localhost:8000',
match: /^\/api\/.*/
}
}
}),
// ======================================================
// Overrides when NODE_ENV === 'production'
// ======================================================
production: (config) => ({
compiler_public_path: '/',
compiler_fail_on_warning: false,
compiler_hash_type: 'chunkhash',
compiler_devtool: null,
compiler_stats: {
chunks: true,
chunkModules: true,
colors: true
},
proxy: {
enabled: true,
options: {
host: 'http://localhost:8000',
match: /^\/api\/.*/
}
}
})
};