Skip to content

Commit abc1bed

Browse files
authored
doc(README.md): modification prod/dev
1 parent e2e4069 commit abc1bed

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ export default function(config: webpack.Configuration) {
6767
}
6868
```
6969

70+
#### Prod and dev mode modifications (ngw.config.ts)
71+
72+
```ts
73+
export default function(config, options) {
74+
//common config modification
75+
...
76+
switch(options.buildOptions.enviroment) {
77+
case 'prod':
78+
config = productionModificationsMerged(config);
79+
break
80+
case 'dev':
81+
//etc
82+
}
83+
}
84+
```
85+
86+
7087
## Caution
7188

7289
For complex cases it's more appropriate to use `ng eject` command. Default building process could be changed significanlty in further `@angular/cli` releases so your customization could break (or became broken).

0 commit comments

Comments
 (0)