From 152ef9b5c7dd619ec61c8712388a7fff42c00ef5 Mon Sep 17 00:00:00 2001 From: Yann Pringault Date: Wed, 16 Aug 2017 02:17:37 +0200 Subject: [PATCH] Fix docs for `printFileSizesAfterBuild` (#2942) * Fix docs for `printFileSizesAfterBuild` * Add optionals parameters for `printFileSizesAfterBuild` --- packages/react-dev-utils/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-dev-utils/README.md b/packages/react-dev-utils/README.md index e23f0a294..034790c22 100644 --- a/packages/react-dev-utils/README.md +++ b/packages/react-dev-utils/README.md @@ -170,9 +170,9 @@ module: { Captures JS and CSS asset sizes inside the passed `buildFolder`. Save the result value to compare it after the build. -##### `printFileSizesAfterBuild(webpackStats: WebpackStats, previousFileSizes: OpaqueFileSizes)` +##### `printFileSizesAfterBuild(webpackStats: WebpackStats, previousFileSizes: OpaqueFileSizes, buildFolder: string, maxBundleGzipSize?: number, maxChunkGzipSize?: number)` -Prints the JS and CSS asset sizes after the build, and includes a size comparison with `previousFileSizes` that were captured earlier using `measureFileSizesBeforeBuild()`. +Prints the JS and CSS asset sizes after the build, and includes a size comparison with `previousFileSizes` that were captured earlier using `measureFileSizesBeforeBuild()`. `maxBundleGzipSize` and `maxChunkGzipSizemay` may optionally be specified to display a warning when the main bundle or a chunk exceeds the specified size (in bytes). ```js var { @@ -182,7 +182,7 @@ var { measureFileSizesBeforeBuild(buildFolder).then(previousFileSizes => { return cleanAndRebuild().then(webpackStats => { - printFileSizesAfterBuild(webpackStats, previousFileSizes); + printFileSizesAfterBuild(webpackStats, previousFileSizes, buildFolder); }); }); ```