Skip to content

Commit

Permalink
Fix bundle size report
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrohan committed Jan 2, 2024
1 parent 2b46b7a commit 2070709
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/bundle-size-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { join } from 'path'
import { table } from 'table'
import { dirname } from 'path'
import { fileURLToPath } from 'url'
import filesize from 'filesize'
import {filesize} from 'filesize'
import fs from 'fs'

const __dirname = dirname(fileURLToPath(import.meta.url))
Expand Down Expand Up @@ -113,6 +113,7 @@ const posNeg = v => (v > 0 ? '+ ' : v < 0 ? '- ' : '')

// Beautify the data
data = data.map(row => {
console.log(row)
row[2] = posNeg(row[2]) + `${row[2]}`.replace('-', '')
row[3] = prettySize(row[3])
row[4] = posNeg(row[4]) + `${prettySize(row[4])}`.replace('-', '')
Expand Down

0 comments on commit 2070709

Please sign in to comment.