forked from angular/devkit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(@angular-devkit/build-angular): use devkit/build-webpack
- Loading branch information
1 parent
6d1bc58
commit 138b362
Showing
13 changed files
with
182 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/stats.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import { WebpackConfigOptions } from '../build-options'; | ||
|
||
const webpackOutputOptions = { | ||
colors: true, | ||
hash: true, // required by custom stat output | ||
timings: true, // required by custom stat output | ||
chunks: true, // required by custom stat output | ||
chunkModules: false, | ||
children: false, // listing all children is very noisy in AOT and hides warnings/errors | ||
modules: false, | ||
reasons: false, | ||
warnings: true, | ||
errors: true, | ||
assets: true, // required by custom stat output | ||
version: false, | ||
errorDetails: false, | ||
moduleTrace: false, | ||
}; | ||
|
||
const verboseWebpackOutputOptions = { | ||
children: true, | ||
assets: true, | ||
version: true, | ||
reasons: true, | ||
chunkModules: false, // TODO: set to true when console to file output is fixed | ||
errorDetails: true, | ||
moduleTrace: true, | ||
}; | ||
|
||
export function getWebpackStatsConfig(verbose = false) { | ||
return verbose | ||
? Object.assign(webpackOutputOptions, verboseWebpackOutputOptions) | ||
: webpackOutputOptions; | ||
} | ||
|
||
export function getStatsConfig(wco: WebpackConfigOptions) { | ||
const verbose = !!wco.buildOptions.verbose; | ||
|
||
return { stats: getWebpackStatsConfig(verbose) }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.