-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Please can you optimize the size of the VSCode extension #139
Comments
@orta can we do anything about this? I'm not sure how the publish-to-marketplace stuff works and how we could add a bundle/minify step before that. |
The official recommendations are here: https://code.visualstudio.com/api/working-with-extensions/bundling-extension Basically it's 'move to webpack' |
Tried with a rollup config, but no success. So far I have:
Yes, this all feels very hacky 😄 Problems:
|
I did this https://github.com/mgholam/svelte-multi-page-app with one |
Down to less than 90mb now. Since we do some dynamic requires/depending on node_modules resolution at runtime and that is very tricky in combination with bundling, I will not explore bundling further for now. |
What kind of numbers are we looking at if all goes well (currently at 80mb)? The biggest folder is "typescript" at 54mb right now. |
Honestly I don't know, but with bundling and minification I assume it could go down to less than 10mb. |
Can you give me a starting point, so I can have a crack at this? |
Not really I'm afraid. I would try webpack (my attempt with rollup failed) and then try to write a config to bundle the extension ( |
How can we keep the |
You mean we don't bundle and instead just delete
|
Just find out vetur actually vscodeignore a lot of files in Another potential optimization is prettier. Prettier ships both ESM( |
That's a nice idea which is low-effort and can be done directly without introducing a build step (which we may want later, but not right now) - would you like to test this out and create a PR for it? |
#139 - Ignore some different purpose builds for typescript. We didn't use them. - Ignore typescript localization. We didn't enable localized diagnostic. - Ignore large ESM files, We're currently using common js Brings the size down from 105MB to 42MB. About typescript localization, it's possible to enable this. So if we want to enable it in the future, we can unignore these files.
Is your feature request related to a problem? Please describe.
Please can you optimize the on disk size of the VSCode extension (i.e. smaller than 150mb)
Describe the solution you'd like
By possibly pre-building the extension before publishing.
The text was updated successfully, but these errors were encountered: