@@ -11,8 +11,7 @@ import {
11
11
getNonAotConfig ,
12
12
getAotConfig
13
13
} from './webpack-configs' ;
14
-
15
- const path = require ( 'path' ) ;
14
+ import * as path from 'path' ;
16
15
17
16
export interface WebpackConfigOptions {
18
17
projectRoot : string ;
@@ -32,7 +31,7 @@ export class NgCliWebpackConfig {
32
31
33
32
appConfig = this . addAppConfigDefaults ( appConfig ) ;
34
33
buildOptions = this . addTargetDefaults ( buildOptions ) ;
35
- buildOptions = this . mergeConfigs ( buildOptions , appConfig ) ;
34
+ buildOptions = this . mergeConfigs ( buildOptions , appConfig , projectRoot ) ;
36
35
37
36
this . wco = { projectRoot, buildOptions, appConfig } ;
38
37
}
@@ -106,9 +105,9 @@ export class NgCliWebpackConfig {
106
105
}
107
106
108
107
// Fill in defaults from .angular-cli.json
109
- public mergeConfigs ( buildOptions : BuildOptions , appConfig : any ) {
108
+ public mergeConfigs ( buildOptions : BuildOptions , appConfig : any , projectRoot : string ) {
110
109
const mergeableOptions = {
111
- outputPath : appConfig . outDir ,
110
+ outputPath : path . resolve ( projectRoot , appConfig . outDir ) ,
112
111
deployUrl : appConfig . deployUrl ,
113
112
baseHref : appConfig . baseHref
114
113
} ;
0 commit comments