File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ export function buildReporterPlugin(config: ResolvedConfig): Plugin {
26
26
const compress = promisify ( gzip )
27
27
const chunkLimit = config . build . chunkSizeWarningLimit
28
28
29
+ const numberFormatter = new Intl . NumberFormat ( 'en' , {
30
+ maximumFractionDigits : 2 ,
31
+ minimumFractionDigits : 2 ,
32
+ } )
33
+ const displaySize = ( bytes : number ) => {
34
+ return `${ numberFormatter . format ( bytes / 1000 ) } kB`
35
+ }
36
+
29
37
const tty = process . stdout . isTTY && ! process . env . CI
30
38
const shouldLogInfo = LogLevels [ config . logLevel || 'info' ] >= LogLevels . info
31
39
let hasTransformed = false
@@ -322,13 +330,6 @@ function throttle(fn: Function) {
322
330
}
323
331
}
324
332
325
- function displaySize ( bytes : number ) {
326
- return `${ ( bytes / 1000 ) . toLocaleString ( 'en' , {
327
- maximumFractionDigits : 2 ,
328
- minimumFractionDigits : 2 ,
329
- } ) } kB`
330
- }
331
-
332
333
function displayTime ( time : number ) {
333
334
// display: {X}ms
334
335
if ( time < 1000 ) {
You can’t perform that action at this time.
0 commit comments