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

Improvements to webpack #452

Closed
DonJayamanne opened this issue Feb 22, 2020 · 3 comments · Fixed by #474
Closed

Improvements to webpack #452

DonJayamanne opened this issue Feb 22, 2020 · 3 comments · Fixed by #474
Assignees

Comments

@DonJayamanne
Copy link
Owner

  • Smaller bundles
  • Fast loading of extension
@ole1986
Copy link
Contributor

ole1986 commented Feb 23, 2020

I once tried to bundle all the server sources with webpack. But it was very tricky with the express package (and some other I cannot remember the name now) being included.

I think once we get rid of the express package (as mentioned in #451) and replace with webview.postMessege, bundling it should work very smooth.

As a side note:
By mistake it can happen very fast that the size of the current bundle.js (browser bundle) increases significantly by only adding another icon from react-icons package for instance.

@DonJayamanne
Copy link
Owner Author

By mistake it can happen very fast

We can add a GitHub action to ensure bundle size doesnt increase by more than 20% of previous known (hardcoded) size.
I.e add a test and hardcoded a value 5mb, if new size is 30% more than 5mb, then test fails. This way nothing can go in noticed.

@DonJayamanne
Copy link
Owner Author

If interested you can have a look at the python extension for VSCode. I added webpage to that, and things are great (both extension and react bundles). We are shipping koa today in that extension, I prefer koa over express.

@ole1986 ole1986 self-assigned this Feb 28, 2020
@ole1986 ole1986 linked a pull request Feb 28, 2020 that will close this issue
@ole1986 ole1986 closed this as completed Mar 5, 2020
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 a pull request may close this issue.

2 participants