Skip to content

File size miscalculation (with and without compression) #281

@flowzy

Description

@flowzy

Do you want to request a feature or report a bug?
Report a bug.

What is the current behavior?
Test task fails, because bundlesize miscalculates file size.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Clone this repository
  2. Install dependencies, using Yarn (yarn install)
  3. Run yarn test (it will also compress images, so perhaps it's best to delete "headers" folder inside "src/img")
  4. See it fail, because it thinks the image "flair-sprite.png" is almost twice the size it really is. Example (in reality it is 473.03 KB)

The repository also has a "build shield", which redirects you to the Travis CI page. There you can check logs and see the build failing.

What is the expected behavior?
Test task successfully completes, because all file sizes are below the specified limit (500 KB).

Please mention other relevant information.

  • node version: v10.15.1 (lts/*) & v11.10.0 (node)
  • npm version: v6.4.1
  • Operating system: Linux & macOS
  • bundlesize version: ^0.17.1
  • CI you are using: Travis CI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions