Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in file size not reported in 2.0 #5333

Closed
OskarPersson opened this issue Oct 6, 2018 · 2 comments · Fixed by #5335
Closed

Difference in file size not reported in 2.0 #5333

OskarPersson opened this issue Oct 6, 2018 · 2 comments · Fixed by #5335

Comments

@OskarPersson
Copy link
Contributor

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Environment

System:
  OS: macOS 10.14
  CPU: x64 Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
Binaries:
  Node: 8.11.4 - ~/.nvm/versions/node/v8.11.4/bin/node
  Yarn: 1.10.1 - /usr/local/bin/yarn
  npm: 5.6.0 - ~/.nvm/versions/node/v8.11.4/bin/npm
Browsers:
  Chrome: 69.0.3497.100
  Firefox: 62.0
  Safari: 12.0
npmPackages:
  react: ^16.5.2 => 16.5.2
  react-dom: ^16.5.2 => 16.5.2
  react-scripts: 1.1.5 => 1.1.5
npmGlobalPackages:
  create-react-app: Not Found

Steps to Reproduce

(Write your steps here:)

  1. create new app
  2. build app
  3. make minor change in JS or CSS
  4. build app

Expected Behavior

Difference in file sizes after gzip is reported on yarn build:

> yarn build
yarn run v1.10.1
react-scripts build
Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  36.99 KB (+36.3 KB)  build/static/js/main.cd85f7f2.js
  416 B (-7 B)         build/static/css/main.a7c7d0be.css

Actual Behavior

Difference in file sizes after gzip is not reported on yarn build

> yarn build
yarn run v1.10.1
react-scripts build
Creating an optimized production build...
Compiled successfully.

File sizes after gzip:

  36.99 KB  build/static/js/main.cd85f7f2.js
  416 B         build/static/css/main.a7c7d0be.css
@gaearon gaearon added this to the 2.0.x milestone Oct 6, 2018
@gaearon
Copy link
Contributor

gaearon commented Oct 6, 2018

Want to look into why?

@OskarPersson
Copy link
Contributor Author

Sure, I will give it a try

OskarPersson added a commit to OskarPersson/create-react-app that referenced this issue Oct 6, 2018
Fixes facebook#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.
Timer pushed a commit that referenced this issue Oct 6, 2018
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.
@Timer Timer modified the milestones: 2.0.x, 2.0.5 Oct 6, 2018
@lock lock bot locked and limited conversation to collaborators Jan 10, 2019
Pong420 pushed a commit to Pong420/create-react-app that referenced this issue Feb 24, 2019
Fixes facebook#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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants