Commit Graph

12 Commits

Author SHA1 Message Date
Oskar Persson
9fd98447d8 Fix file size report after build (#5335)
Fixes #5333

printFileSizesAfterBuild calls canReadAsset with an object containing
the file name while measureFileSizesBeforeBuild calls it with just the
name. When canReadAsset only receives the name it returns false since
accessing the `name` property results in undefined.

This commit fixes that by having canReadAssset instead expect only the
file name and making printFileSizesAfterBuild just like
measureFileSizesBeforeBuild only provide the name as argument.
2018-10-06 18:27:30 -04:00
Joe Haddad
401ff540e4 Filter out precache assets 2018-09-28 23:25:27 -04:00
Joe Haddad
b8da58499a Optimize webpack rebuild speed (#5065)
Derived from https://github.com/facebook/create-react-app/issues/4492#issuecomment-421959548
2018-09-22 13:44:58 -04:00
Fredrik Palmquist
f11bea1e4c Fix file size reporter on Windows (#5025)
* fix FileSizeReporter in Windows enviroment

* chore: change line endings
2018-09-19 08:25:55 -04:00
Juhamatti Niemelä
d61a3313f6 Fix asset size comparison for multi build stats (#3514)
If create-react-app project is ejected and webpack configuration is
modified to multi build setup FileSizeReporter would fail.

In those situations `webpackStats` parameter would contain stats array
for each build. This fix will try to access stats and then falls back
to using plaing webpackStats object.
2018-01-09 15:13:59 +00:00
Sophie Alpert
2e82ebb337 BSD+Patents -> MIT (#3189)
* File headers BSD+Patents -> MIT

* BSD+Patents -> MIT
2017-09-26 10:30:05 +01:00
Erik J. Sturcke
270b1dc5cd Strip hash from chunk file name (#3049) 2017-09-01 12:56:17 -07:00
Dan Abramov
a171d93064 Reformat source code with Prettier 1.5.2 2017-06-28 16:23:16 +01:00
Dan Abramov
7cf4de71fa Warn about large bundle sizes (#2648) 2017-06-28 00:00:49 +01:00
Jin Zheng
b60f55c6bf Print file sizes with correct build folder path. (#2361)
* Print file sizes with correct build folder path.

* Just use the print the basename.
2017-05-25 16:18:29 +01:00
Valerii Sorokobatko
fe7b5c212b update to modern code style (#1738)
* mv create-react-app/index.js -> create-react-app/creteReactApp.js

* update to modern code style

* var -> cosnt

* set trailing-coma to es5 for prettier
2017-03-07 19:46:10 +00:00
Ade Viankakrisna Fadlil
fbdff9d722 extract generic build functions to react-dev-utils (#1726)
* Temp rename

* Rename to change the case

* extract generic build functions to react-dev-utils

* tweak package json files and move removeFileNameHash

* revert removeFileNameHash

* use paths.appBuild in printFileSizes

* use paths.appBuild in removeFileNameHash

* change curried functions to regular functions

* add fs-extra to react-dev-utils deps

* move getDifferenceLabel inside printFileSizes

* inline copyPublicFolder

* combine printFileSizes and removeFileNameHash to fileSizeReporter

* fix typo

* Tweak APIs and fix issues

* Fix heading

* Remove missing file

* Newline

* Newline

* Trailing space

* Update FileSizeReporter.js

* Update build.js
2017-03-06 01:49:53 +00:00