Skip to content
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

Using Webpack to reduce our extension size #66

Merged
merged 4 commits into from
Feb 22, 2019

Conversation

parithon
Copy link
Collaborator

@parithon parithon commented Feb 17, 2019

Instead of including node_modules/ with our extension (upwards of 3300 files) in this PR I use webpack to reduce that to 15 files. Not to mention it reduces our size by an awesome 91%!

Without webpack:
image

With webpack:
image

Files in VSIX:
image

@parithon parithon changed the title Using Webpack to reduce our extension size WIP - Using Webpack to reduce our extension size Feb 17, 2019
@parithon
Copy link
Collaborator Author

There appears to be an issue with the source maps that Webpack creates. You set a breakpoint on line 25, but when debugging the breakpoints are in a different location (line 90).

Breakpoint before debug:
image

Breakpoint during debug:
image

@parithon parithon changed the title WIP - Using Webpack to reduce our extension size Using Webpack to reduce our extension size Feb 17, 2019
@parithon
Copy link
Collaborator Author

Because of the issues with the source maps using Webpack during debugging we will only use Webpack when packaging (pre-publishing) the extension prior to publishing to the marketplace. Webpack will clear out the 'out' folder prior to packaging the javascript.

@clarkio
Copy link
Owner

clarkio commented Feb 18, 2019

Wow, this is awesome! My only concern is I don't know how to use Webpack but this will finally force me to learn more about it 😄

package.json Show resolved Hide resolved
@clarkio clarkio added this to the 0.1.4 milestone Feb 22, 2019
Copy link
Owner

@clarkio clarkio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is way better now and will install a lot quicker I'm sure. Thank you so much for contributing these changes!

@clarkio clarkio merged commit ecb665e into clarkio:vnext Feb 22, 2019
@parithon parithon deleted the use-webpack branch February 24, 2019 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants