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

Commit 9946c64

Browse files
filipesilvaBrocco
authored andcommitted
fix(build): use outputPath from config
Follow up from angular#2158 Fix angular#2511 Close angular#2611
1 parent f565091 commit 9946c64

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/angular-cli/tasks/build-webpack-watch.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const ProgressPlugin = require('webpack/lib/ProgressPlugin');
66
import { NgCliWebpackConfig } from '../models/webpack-config';
77
import { webpackOutputOptions } from '../models/';
88
import { BuildOptions } from '../commands/build';
9+
import { CliConfig } from '../models/config';
910

1011
let lastHash: any = null;
1112

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

1516
const project = this.cliProject;
1617

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));
1820

1921
const config = new NgCliWebpackConfig(
2022
project,
2123
runTaskOptions.target,
2224
runTaskOptions.environment,
23-
runTaskOptions.outputPath,
25+
outputDir,
2426
runTaskOptions.baseHref,
2527
runTaskOptions.aot
2628
).config;

0 commit comments

Comments
 (0)