Skip to content
This repository has been archived by the owner on Jul 21, 2022. It is now read-only.

Commit

Permalink
fix(build): use outputPath from config
Browse files Browse the repository at this point in the history
Follow up from angular#2158
Fix angular#2511
Close angular#2611
  • Loading branch information
filipesilva authored and Brocco committed Oct 19, 2016
1 parent f565091 commit 9946c64
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 9946c64

Please sign in to comment.