mkxml / vscode-filesize

filesize package for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=mkxml.vscode-filesize
MIT License
60 stars 13 forks source link

Extension VSIX too big? #30

Closed tyler36 closed 3 years ago

tyler36 commented 3 years ago

Recently, there was an issue with 2.1.4 and at the time, I looked around around for potential replacements.

I came across file-size.

When your extension updated this morning, I downloaded the VSIX file and notice a huge differnece. mkxml.vscode-filesize-3.0.0.vsix = 415KB zh9528.file-size-1.0.0.vsix = 5KB

The other extension doesn't seem as feature-rich as yours but still, it feels like something is going on here. Are there any optimizations, minification or something else the 3.0.0.vsix is missing?

The .vscodeignore appears fine. It still feels like something, somewhere is getting bundled when perhaps it's not needed?

mkxml commented 3 years ago

Hello @tyler36. Thank you for using 3.0.0.

This happened in 3.0.0 because now we are bundling dependencies together with webpack in the VSIX.

Which is recommended by VS Code devs.

So the size is bigger but the loading is faster.

Check this doc: https://code.visualstudio.com/api/working-with-extensions/bundling-extension

mkxml commented 3 years ago

Basically instead of importing lots of small files in the client, the client imports one big bundled file.

And according to the docs it works better this way.

mkxml commented 3 years ago

I implemented some changes in version 3.1.0.

The size now is roughly 65KB.

Using less dependencies.

Closing for now.

Thank you for your insight!

tyler36 commented 3 years ago

Thank you for the update. And thanks for taking the time to explained the why. It helps me grow as developer. :)