File tree 1 file changed +4
-2
lines changed
packages/angular-cli/tasks
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin');
6
6
import { NgCliWebpackConfig } from '../models/webpack-config' ;
7
7
import { webpackOutputOptions } from '../models/' ;
8
8
import { BuildOptions } from '../commands/build' ;
9
+ import { CliConfig } from '../models/config' ;
9
10
10
11
let lastHash : any = null ;
11
12
@@ -14,13 +15,14 @@ export default Task.extend({
14
15
15
16
const project = this . cliProject ;
16
17
17
- rimraf . sync ( path . resolve ( project . root , runTaskOptions . outputPath ) ) ;
18
+ const outputDir = runTaskOptions . outputPath || CliConfig . fromProject ( ) . config . apps [ 0 ] . outDir ;
19
+ rimraf . sync ( path . resolve ( project . root , outputDir ) ) ;
18
20
19
21
const config = new NgCliWebpackConfig (
20
22
project ,
21
23
runTaskOptions . target ,
22
24
runTaskOptions . environment ,
23
- runTaskOptions . outputPath ,
25
+ outputDir ,
24
26
runTaskOptions . baseHref ,
25
27
runTaskOptions . aot
26
28
) . config ;
You can’t perform that action at this time.
0 commit comments