Code Monkey home page Code Monkey logo

Comments (10)

ai avatar ai commented on July 24, 2024 1

I like the idea to show the difference! :)

from size-limit.

ai avatar ai commented on July 24, 2024

Seems like we need to show bytes here to explain reason.

from size-limit.

ai avatar ai commented on July 24, 2024

But this issue will be low priority since we recommend to add extra bytes for limits. In you case, most of PR will fall build step. Even if you add one single variable.

from size-limit.

okonet avatar okonet commented on July 24, 2024

Makes sense but still very confusing for the first experience. Probably some error boundaries should be backed into the library?

from size-limit.

ai avatar ai commented on July 24, 2024

Can’t reproduce :(. Can you share your project?

from size-limit.

okonet avatar okonet commented on July 24, 2024

Been trying it here: react-dropzone/attr-accept#11 and ended up increasing the limit.

from size-limit.

ai avatar ai commented on July 24, 2024

Done c6e45a3

from size-limit.

ai avatar ai commented on July 24, 2024

I will release it with messages fixes.

from size-limit.

okonet avatar okonet commented on July 24, 2024

Thanks!

I'm still a bit concerned about the DX here. Now it reports size in bytes, but we specify it in KBs or even MBs :trollface: which will lead to an additional mental overhead for developers. I see at least two ways how this can be improved:

  1. Do not show the actual size, instead show the difference.
  2. Additionally display pretty formatted sizes

Something like:

Limit exceeded by 142 Bytes!
Actual size: 1.6 KB - 16343 B
Size Limit: 1.6 KB - 15634 B

Or a table view probably?

Actual | Limit  | Diff
-------------------------
1.6 KB | 1.6 KB | +12 B

from size-limit.

ai avatar ai commented on July 24, 2024

Done 6d1cc85

from size-limit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.