@@ -11,8 +11,7 @@ import {
1111 getNonAotConfig ,
1212 getAotConfig
1313} from './webpack-configs' ;
14-
15- const path = require ( 'path' ) ;
14+ import * as path from 'path' ;
1615
1716export interface WebpackConfigOptions {
1817 projectRoot : string ;
@@ -32,7 +31,7 @@ export class NgCliWebpackConfig {
3231
3332 appConfig = this . addAppConfigDefaults ( appConfig ) ;
3433 buildOptions = this . addTargetDefaults ( buildOptions ) ;
35- buildOptions = this . mergeConfigs ( buildOptions , appConfig ) ;
34+ buildOptions = this . mergeConfigs ( buildOptions , appConfig , projectRoot ) ;
3635
3736 this . wco = { projectRoot, buildOptions, appConfig } ;
3837 }
@@ -106,9 +105,9 @@ export class NgCliWebpackConfig {
106105 }
107106
108107 // Fill in defaults from .angular-cli.json
109- public mergeConfigs ( buildOptions : BuildOptions , appConfig : any ) {
108+ public mergeConfigs ( buildOptions : BuildOptions , appConfig : any , projectRoot : string ) {
110109 const mergeableOptions = {
111- outputPath : appConfig . outDir ,
110+ outputPath : path . resolve ( projectRoot , appConfig . outDir ) ,
112111 deployUrl : appConfig . deployUrl ,
113112 baseHref : appConfig . baseHref
114113 } ;
0 commit comments