@@ -10,8 +10,7 @@ import {
10
10
getNonAotConfig ,
11
11
getAotConfig
12
12
} from './webpack-configs' ;
13
-
14
- const path = require ( 'path' ) ;
13
+ import * as path from 'path' ;
15
14
16
15
export interface WebpackConfigOptions {
17
16
projectRoot : string ;
@@ -31,7 +30,7 @@ export class NgCliWebpackConfig {
31
30
32
31
appConfig = this . addAppConfigDefaults ( appConfig ) ;
33
32
buildOptions = this . addTargetDefaults ( buildOptions ) ;
34
- buildOptions = this . mergeConfigs ( buildOptions , appConfig ) ;
33
+ buildOptions = this . mergeConfigs ( buildOptions , appConfig , projectRoot ) ;
35
34
36
35
this . wco = { projectRoot, buildOptions, appConfig } ;
37
36
}
@@ -94,9 +93,9 @@ export class NgCliWebpackConfig {
94
93
}
95
94
96
95
// Fill in defaults from .angular-cli.json
97
- public mergeConfigs ( buildOptions : BuildOptions , appConfig : any ) {
96
+ public mergeConfigs ( buildOptions : BuildOptions , appConfig : any , projectRoot : string ) {
98
97
const mergeableOptions = {
99
- outputPath : appConfig . outDir ,
98
+ outputPath : path . resolve ( projectRoot , appConfig . outDir ) ,
100
99
deployUrl : appConfig . deployUrl ,
101
100
baseHref : appConfig . baseHref
102
101
} ;
0 commit comments