Comments (10)
I like the idea to show the difference! :)
from size-limit.
Seems like we need to show bytes here to explain reason.
from size-limit.
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.
Makes sense but still very confusing for the first experience. Probably some error boundaries should be backed into the library?
from size-limit.
Can’t reproduce :(. Can you share your project?
from size-limit.
Been trying it here: react-dropzone/attr-accept#11 and ended up increasing the limit.
from size-limit.
Done c6e45a3
from size-limit.
I will release it with messages fixes.
from size-limit.
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 which will lead to an additional mental overhead for developers. I see at least two ways how this can be improved:
Do not show the actual size, insteadshow the difference.- 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.
Done 6d1cc85
from size-limit.
Related Issues (20)
- Possibility to use size-limit with nextjs apps HOT 1
- Should I ignore some file types?
- size-limit fails with rxjs imports
- Add customisation for improving performance culture HOT 6
- Loosen strictness of peer dependency requirement of `tslib` HOT 1
- Global installation with plugin support HOT 5
- React should be peer dependency HOT 7
- The comment might be misleading when size limit fails HOT 5
- Unable to run on windows 10 HOT 4
- Receive ERR_UNSUPPORTED_ESM_URL_SCHEME error on version 10 HOT 5
- Switch from GZIP to Brotli by default HOT 4
- plugins are `import`ed with `require.resolve` which will resolve `commonjs` entry for dual package HOT 4
- Allow customize error message HOT 1
- Inaccurate bundle size when using dynamic imports HOT 10
- Support `.size-limit.mjs` config file HOT 2
- Migrate codebase to TypeScript HOT 4
- Esbuild plugin produces incorrect numbers when CSS used HOT 7
- Extra blank lines when using --silent HOT 1
- CLI does not work with workspaces and yarn pnp or pnpm without hoisting HOT 4
- Can the config option be supported like eslint or stylelint to specify the path of the configuration file? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from size-limit.