vscode-filesize icon indicating copy to clipboard operation
vscode-filesize copied to clipboard

"Show Brotli" option does not work as expected

Open GoudronViande24 opened this issue 3 years ago • 2 comments

This option in the settings: image

When enabled, it does not show in status bar. I only have "Raw" and "Gzip". When enabled, it does show up in detailed view, and when disabled, it doesn't. Maybe just the description is wrong? I would like to have brotli compression in status bar since it is the compression used by almost all my projects once online.

Thank you!

GoudronViande24 avatar Jan 23 '22 00:01 GoudronViande24

Yes, I just noticed the same problem

nickchomey avatar Nov 15 '23 22:11 nickchomey

Well, I "fixed" this by doing the following:

  1. Find your extension folder and open the extension file e.g. /home/nick/.vscode-server/extensions/mkxml.vscode-filesize-3.1.0/dist/extension.js
  2. Find and change
(e.text=`Raw: ${p.prettySize}`,p=r.addGzipSize(p,o),e.text+=` | Gzip: ${p.gzipSize}`)

to

(e.text=`Raw: ${p.prettySize}`,p=r.addGzipSize(p,o),e.text+=` | Gz: ${p.gzipSize}`,p=r.addBrotliSize(p,o),e.text+=` | Br: ${p.brotliSize}`)
  1. Restart VS Code

It'll ignore the broken toggle setting, but will show the filesize in brotli like this: image

nickchomey avatar Nov 15 '23 22:11 nickchomey