1
+ import { CliConfig } from './config' ;
1
2
import {
2
3
getWebpackCommonConfig ,
3
4
getWebpackDevConfigPartial ,
4
5
getWebpackProdConfigPartial ,
5
6
getWebpackMaterialConfig ,
6
- getWebpackMaterialE2EConfig
7
+ getWebpackMaterialE2EConfig ,
8
+ getWebpackMobileConfigPartial ,
9
+ getWebpackMobileProdConfigPartial
7
10
} from './' ;
8
11
9
12
const webpackMerge = require ( 'webpack-merge' ) ;
@@ -18,13 +21,23 @@ export class NgCliWebpackConfig {
18
21
private webpackBaseConfig : any ;
19
22
private webpackMaterialConfig : any ;
20
23
private webpackMaterialE2EConfig : any ;
24
+ private webpackMobileConfigPartial : any ;
25
+ private webpackMobileProdConfigPartial : any ;
21
26
22
27
constructor ( public ngCliProject : any , public environment : string ) {
23
28
this . webpackBaseConfig = getWebpackCommonConfig ( this . ngCliProject . root ) ;
24
29
this . webpackMaterialConfig = getWebpackMaterialConfig ( this . ngCliProject . root ) ;
25
30
this . webpackMaterialE2EConfig = getWebpackMaterialE2EConfig ( this . ngCliProject . root ) ;
26
31
this . webpackDevConfigPartial = getWebpackDevConfigPartial ( this . ngCliProject . root ) ;
27
32
this . webpackProdConfigPartial = getWebpackProdConfigPartial ( this . ngCliProject . root ) ;
33
+ this . webpackMobileConfigPartial = getWebpackMobileConfigPartial ( this . ngCliProject . root ) ;
34
+ this . webpackMobileProdConfigPartial = getWebpackMobileProdConfigPartial ( this . ngCliProject . root ) ;
35
+
36
+ if ( CliConfig . fromProject ( ) . apps [ 0 ] . mobile ) {
37
+ this . webpackDevConfigPartial = webpackMerge ( this . webpackDevConfigPartial , this . webpackMobileConfigPartial ) ;
38
+ this . webpackProdConfigPartial = webpackMerge ( this . webpackProdConfigPartial , this . webpackMobileProdConfigPartial ) ;
39
+ }
40
+
28
41
this . generateConfig ( ) ;
29
42
}
30
43
0 commit comments