Skip to content

FileSizeReporter reports with wrong (hardcoded) path. #2357

Closed
@fezhengjin

Description

@fezhengjin

Can you reproduce the problem with latest npm?

yes

Description

When i changed the value of appBuild property to dist in "react-scripts/config/paths.js" and run npm run build, the printFileSizesAfterBuild function logged wrong paths.

Expected behavior

Log in the console should be like:

File sizes after gzip:

  16.13 KB  dist/static/js/main.3a5b25c4.js
  5.72 KB   dist/static/css/main.dc21d15c.css

Actual behavior

But it still reported with "build" in paths:

File sizes after gzip:

  16.13 KB  build/static/js/main.3a5b25c4.js
  5.72 KB   build/static/css/main.dc21d15c.css

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
  2. node -v: v7.4.0
  3. npm -v: 4.0.5

Then, specify:

  1. Operating system: macOS Sierra 10.12.4
  2. Browser and version:

Hardcode

https://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/FileSizeReporter.js#L33

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions