Commit e8a3e4b2 authored by Yann Pringault's avatar Yann Pringault Committed by Joe Haddad
Browse files

Fix docs for `printFileSizesAfterBuild` (#2942)

* Fix docs for `printFileSizesAfterBuild`

* Add optionals parameters for `printFileSizesAfterBuild`
parent 6efab2e1
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 3 additions and 3 deletions
+3 -3
......@@ -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);
});
});
```
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment