Skip to content

bundle the extension with webpack #416

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

bundle the extension with webpack #416

wants to merge 1 commit into from

Conversation

quanzhuo
Copy link

Currently , this extension vsix is nearly 10 MB, It discreased to 2MB after bundle and minify it with webpack. Please see the offical information about bundle:

Bundling Extensions
The first reason to bundle your Visual Studio Code extension is to make sure it works for everyone using VS Code on any platform. Only bundled extensions can be used in VS Code for Web environments like github.dev and vscode.dev. When VS Code is running in the browser, it can only load one file for your extension so the extension code needs to be bundled into one single web-friendly JavaScript file. This also applies to Notebook Output Renderers, where VS Code will also only load one file for your renderer extension.

In addition, extensions can quickly grow in size and complexity. They may be authored in multiple source files and depend on modules from npm. Decomposition and reuse are development best practices but they come at a cost when installing and running extensions. Loading 100 small files is much slower than loading one large file. That's why we recommend bundling. Bundling is the process of combining multiple small source files into a single file.

@gnikit
Copy link
Member

gnikit commented Apr 19, 2022

Thanks for the PR but I think a lot of this is already in the dev branch #293 which is actually the pre-Released version in the store (the 10Mb vsix).

The problem with the size of the extension is the assets for the README, basically there is an intro GIF that takes 9.3 Mb and couldn't be compressed any more since it would lead to loss of quality.

Given that this feature has already been implemented and released (but not yet merged to master) I will be closing this PR.

@gnikit gnikit closed this Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants