chore: use "kB" everywhere with the correct definition#14061
Merged
bluwy merged 3 commits intovitejs:mainfrom Aug 21, 2023
Merged
chore: use "kB" everywhere with the correct definition#14061bluwy merged 3 commits intovitejs:mainfrom
bluwy merged 3 commits intovitejs:mainfrom
Conversation
|
|
naruaway
commented
Aug 10, 2023
| 'utf-8', | ||
| ) | ||
| const kb = size / 1024 | ||
| const kb = size / 1000 |
Contributor
Author
There was a problem hiding this comment.
Oh this change triggered the limit 😅
packages/vite build: [!] (plugin bundle-limit) Error: Bundle size exceeded 120 kB, current size is 121.86kb.
packages/vite build: at Object.generateBundle (file:///home/runner/work/vite/vite/packages/vite/rollup.config-1691641081524.mjs:360:23)
packages/vite build: at /home/runner/work/vite/vite/node_modules/.pnpm/rollup@3.28.0/node_modules/rollup/dist/shared/rollup.js:1909:40
packages/vite build: ELIFECYCLE Command failed with exit code 1.
packages/vite build: ERROR: "build-bundle" exited with 1.
packages/vite build: Failed
Contributor
Author
e235780 to
3b4904f
Compare
ArnaudBarre
previously approved these changes
Aug 11, 2023
Member
|
It seems we are using 4KiB as a default value for vite/packages/vite/src/node/build.ts Lines 108 to 113 in 2c1a45c I guess it's better to keep the value as-is to avoid the breaking change, and correct the 4kB comment to 4KiB.
|
Contributor
Author
|
@sapphi-red, thanks, I missed that pattern. I now ran |
bluwy
approved these changes
Aug 21, 2023
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recently I got confused with inconsistent usages across tools around "Kilobyte".
And then I just found Vite chose to use "kB = 1000 bytes" in #10982.
This PR is just to fix small remaining inconsistencies.
I searched these using
ripgrepby runningrg --hidden -i -w kbandrg --hidden -i -w kibChanges in this PR should not affect the behavior of Vite itself