@@ -14,8 +14,10 @@ export class CordovaServeBuilder implements Builder<CordovaServeBuilderSchema> {
14
14
constructor ( public context : BuilderContext ) { }
15
15
16
16
run ( builderConfig : BuilderConfiguration < CordovaServeBuilderSchema > ) : Observable < BuildEvent > {
17
- const [ project , target , configuration ] = builderConfig . options . devServerTarget . split ( ':' ) ;
18
- const { port, host, ssl, proxyConfig } = builderConfig . options ;
17
+ const { options : cordovaServeOptions } = builderConfig ;
18
+ const { devServerTarget, port, host, ssl, proxyConfig } = cordovaServeOptions ;
19
+ const [ project , target , configuration ] = devServerTarget . split ( ':' ) ;
20
+
19
21
const devServerTargetSpec = { project, target, configuration, overrides : { port, host, ssl, proxyConfig } } ;
20
22
const devServerBuilderConfig = this . context . architect . getBuilderConfiguration < DevServerBuilderOptions > ( devServerTargetSpec ) ;
21
23
@@ -25,7 +27,7 @@ export class CordovaServeBuilder implements Builder<CordovaServeBuilderSchema> {
25
27
return this . context . architect . getBuilderDescription ( devServerBuilderConfig ) . pipe (
26
28
tap ( description => devServerDescription = description ) ,
27
29
concatMap ( ( ) => this . context . architect . validateBuilderOptions ( devServerBuilderConfig , devServerDescription ) ) ,
28
- concatMap ( ( ) => this . _getCordovaBuildConfig ( builderConfig . options ) ) ,
30
+ concatMap ( ( ) => this . _getCordovaBuildConfig ( cordovaServeOptions ) ) ,
29
31
tap ( config => cordovaBuildConfig = config ) ,
30
32
concatMap ( ( ) => of ( new CordovaDevServerBuilder ( this . context , cordovaBuildConfig . options ) ) ) ,
31
33
concatMap ( builder => builder . run ( devServerBuilderConfig ) )
0 commit comments