Add stats to config (#12023)

* Add stats to config 

Reference 
https://github.com/webpack/extract-text-webpack-plugin/issues/35#issuecomment-176689891

* Update webpack.d.ts
This commit is contained in:
Mohsen Azimi
2016-10-25 23:22:20 +09:00
committed by Masahiro Wakame
parent 6f000f4a24
commit 9f18cfbe98
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ declare module "webpack-dev-server" {
watchOptions?: webpack.WatchOptions;
publicPath: string;
headers?: any;
stats?: webpack.compiler.StatsToJsonOptions | webpack.compiler.StatsToStringOptions;
stats?: webpack.compiler.StatsOptions| webpack.compiler.StatsToStringOptions;
setup?(app: core.Express): void;
}
+5 -3
View File
@@ -63,6 +63,8 @@ declare module "webpack" {
recordsOutputPath?: string;
/** Add additional plugins to the compiler. */
plugins?: (Plugin|Function)[];
/** Stats options for logging */
stats?: compiler.StatsOptions;
}
interface Entry {
@@ -482,12 +484,12 @@ declare module "webpack" {
/** Returns true if there were warnings while compiling. */
hasWarnings(): boolean;
/** Return information as json object */
toJson(options?: StatsToJsonOptions): any; //TODO: type this
toJson(options?: StatsOptions): any; //TODO: type this
/** Returns a formatted string of the result. */
toString(options?: StatsToStringOptions): string;
}
interface StatsToJsonOptions {
interface StatsOptions {
/** context directory for request shortening */
context?: boolean;
/** add the hash of the compilation */
@@ -524,7 +526,7 @@ declare module "webpack" {
assetsSort?: string;
}
interface StatsToStringOptions extends StatsToJsonOptions {
interface StatsToStringOptions extends StatsOptions {
/** With console colors */
colors?: boolean;
}