@@ -10,8 +10,7 @@ import {
1010 getNonAotConfig ,
1111 getAotConfig
1212} from './webpack-configs' ;
13-
14- const path = require ( 'path' ) ;
13+ import * as path from 'path' ;
1514
1615export interface WebpackConfigOptions {
1716 projectRoot : string ;
@@ -31,7 +30,7 @@ export class NgCliWebpackConfig {
3130
3231 appConfig = this . addAppConfigDefaults ( appConfig ) ;
3332 buildOptions = this . addTargetDefaults ( buildOptions ) ;
34- buildOptions = this . mergeConfigs ( buildOptions , appConfig ) ;
33+ buildOptions = this . mergeConfigs ( buildOptions , appConfig , projectRoot ) ;
3534
3635 this . wco = { projectRoot, buildOptions, appConfig } ;
3736 }
@@ -94,9 +93,9 @@ export class NgCliWebpackConfig {
9493 }
9594
9695 // Fill in defaults from .angular-cli.json
97- public mergeConfigs ( buildOptions : BuildOptions , appConfig : any ) {
96+ public mergeConfigs ( buildOptions : BuildOptions , appConfig : any , projectRoot : string ) {
9897 const mergeableOptions = {
99- outputPath : appConfig . outDir ,
98+ outputPath : path . resolve ( projectRoot , appConfig . outDir ) ,
10099 deployUrl : appConfig . deployUrl ,
101100 baseHref : appConfig . baseHref
102101 } ;
0 commit comments