This repository has been archived by the owner on Mar 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.js
137 lines (120 loc) · 4.29 KB
/
constants.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
"use strict";
const root = require('./helpers.js').root
const ip = require('ip');
const { DefinePlugin } = require('webpack');
exports.HOST = ip.address();
exports.DEV_PORT = 3000;
exports.E2E_PORT = 4201;
exports.PROD_PORT = 8088;
/**
* These constants set whether or not you will use proxy for Webpack DevServer
* For advanced configuration details, go to:
* https://webpack.github.io/docs/webpack-dev-server.html#proxy
*/
exports.USE_DEV_SERVER_PROXY = false;
exports.DEV_SERVER_PROXY_CONFIG = {
'**': 'http://localhost:8089'
}
/**
* These constants set the source maps that will be used on build.
* For info on source map options, go to:
* https://webpack.github.io/docs/configuration.html#devtool
*/
exports.DEV_SOURCE_MAPS = 'eval';
exports.PROD_SOURCE_MAPS = 'source-map';
/**
* Set watch options for Dev Server. For better HMR performance, you can
* try setting poll to 1000 or as low as 300 and set aggregateTimeout to as low as 0.
* These settings will effect CPU usage, so optimal setting will depend on your dev environment.
* https://github.com/webpack/docs/wiki/webpack-dev-middleware#watchoptionsaggregatetimeout
*/
exports.DEV_SERVER_WATCH_OPTIONS = {
poll: undefined,
aggregateTimeout: 300,
ignored: /node_modules/
}
/**
* These constants set whether or not you will use proxy for Webpack DevServer
* For advanced configuration details, go to:
* https://webpack.github.io/docs/webpack-dev-server.html#proxy
*/
exports.USE_DEV_SERVER_PROXY = false;
exports.DEV_SERVER_PROXY_CONFIG = {
'**': 'http://localhost:8089'
}
/**
* These constants set the source maps that will be used on build.
* For info on source map options, go to:
* https://webpack.github.io/docs/configuration.html#devtool
*/
// Enable for faster local builds, but no source map support for integrated debugging
exports.DEV_SOURCE_MAPS = 'eval';
// Enable source map support for debugging
// TODO issue with source map generation, maybe related to angular-material
// @see https://github.com/angular/angular-cli/issues/1490
// exports.DEV_SOURCE_MAPS = 'source-map';
exports.PROD_SOURCE_MAPS = 'source-map';
/**
* Set watch options for Dev Server. For better HMR performance, you can
* try setting poll to 1000 or as low as 300 and set aggregateTimeout to as low as 0.
* These settings will effect CPU usage, so optimal setting will depend on your dev environment.
* https://github.com/webpack/docs/wiki/webpack-dev-middleware#watchoptionsaggregatetimeout
*/
exports.DEV_SERVER_WATCH_OPTIONS = {
poll: undefined,
aggregateTimeout: 300,
ignored: /node_modules/
}
/**
* specifies which @ngrx dev tools will be available when you build and load
* your app in dev mode. Options are: monitor | logger | both | none
*/
// exports.STORE_DEV_TOOLS = 'both'
exports.EXCLUDE_SOURCE_MAPS = [
// these packages have problems with their sourcemaps
root('node_modules/@angular'),
root('node_modules/rxjs'),
root('node_modules/apollo-client'),
root('node_modules/apollo-angular'),
root('node_modules/angular2-uuid'),
]
exports.MY_COPY_FOLDERS = [
// use this for folders you want to be copied in to Client dist
// src/assets and index.html are already copied by default.
// format is { from: 'folder_name', to: 'folder_name' }
]
exports.MY_POLYFILL_DLLS = [
// list polyfills that you want to be included in your dlls files
// this will speed up initial dev server build and incremental builds.
// Be sure to run `npm run build:dll` if you make changes to this array.
]
exports.MY_VENDOR_DLLS = [
// list vendors that you want to be included in your dlls files
// this will speed up initial dev server build and incremental builds.
// Be sure to run `npm run build:dll` if you make changes to this array.
'apollo-client',
'apollo-angular'
]
exports.MY_CLIENT_PLUGINS = [
new DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'production'),
},
})
]
exports.MY_CLIENT_PRODUCTION_PLUGINS = [
// use this to import your own webpack config plugins for production use.
]
exports.MY_CLIENT_RULES = [
// use this to import your own rules for Client webpack config.
]
exports.MY_TEST_RULES = [
// use this to import your own rules for Test webpack config.
]
exports.MY_TEST_PLUGINS = [
new DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('test'),
},
})
]