Skip to content

File size reporter on Windows #4927

Description

@fiddep

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

windows, build, size

Environment

Environment:
OS: Windows 10
Node: 10.9.0
Yarn: 1.9.4
npm: 6.2.0
Watchman: Not Found
Xcode: N/A
Android Studio: Not Found
Packages: (wanted => installed)
react: ^16.4.2 => 16.4.2
react-dom: ^16.4.2 => 16.4.2
react-scripts: 1.1.5 => 1.1.5

Steps to Reproduce

  1. create a fresh app
  2. run yarn build
  3. add stuff to any file
  4. run yarn build

Expected Behavior

the output would show that the file size has increased if a previous build was present

Actual Behavior

Nothing else except the current filesize is show
Before: http://prntscr.com/kndf9p
After: http://prntscr.com/kndit2

Possible Solution

The issue seems to be related to Windows and its path delimiter.
Adding
.replace(/\\/g, '/')
in FileSizeReporter
Solves the problem and don't seem to cause any issues on other OS

Would happily submit a PR for this

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