Skip to content

Commit

Permalink
fix(build): use outputPath from config
Browse files Browse the repository at this point in the history
Follow up from #2158
Fix #2511
Close #2611
  • Loading branch information
filipesilva committed Oct 10, 2016
1 parent eb2f939 commit ec0cdb5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/angular-cli/tasks/build-webpack-watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin');
import { NgCliWebpackConfig } from '../models/webpack-config';
import { webpackOutputOptions } from '../models/';
import { BuildOptions } from '../commands/build';
import { CliConfig } from '../models/config';

let lastHash: any = null;

Expand All @@ -14,13 +15,14 @@ export default Task.extend({

const project = this.cliProject;

rimraf.sync(path.resolve(project.root, runTaskOptions.outputPath));
const outputDir = runTaskOptions.outputPath || CliConfig.fromProject().config.apps[0].outDir;
rimraf.sync(path.resolve(project.root, outputDir));

const config = new NgCliWebpackConfig(
project,
runTaskOptions.target,
runTaskOptions.environment,
runTaskOptions.outputPath,
outputDir,
runTaskOptions.baseHref,
runTaskOptions.aot
).config;
Expand Down

0 comments on commit ec0cdb5

Please sign in to comment.