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

Improve bundling of ui dependencies via gulp build #6851

Open
danjm opened this issue Jul 15, 2019 · 1 comment
Open

Improve bundling of ui dependencies via gulp build #6851

danjm opened this issue Jul 15, 2019 · 1 comment
Labels
area-buildSystem related to our build system contributor experience An issue that impacts, or planned improvement to, the contributor experience.

Comments

@danjm
Copy link
Contributor

danjm commented Jul 15, 2019

In #5547, we started bundling some front end dependencies separately from the rest of our UI code.

The purpose of this was to shrink the size of the largest file in our bundle.

There were two noted improvements in that PR.

  • dynamically sourcing the list of dependencies or files to include in separate bundles
  • dynamically inserting script tags into the appropriate *.html files

To complete the first, we need to dynamically source all files that should be in the bundle and then bundle them into a number of files of roughly equal size. Package names are currently hard-coded near the top of the gulp file.

To complete the second, we need to ensure that the <script src="./libs.js" type="text/javascript" charset="utf-8"></script> line in home.html, popup.html and notification.html is only included in production build.

@danjm danjm added area-buildSystem related to our build system reserved labels Jul 15, 2019
@Gudahtt
Copy link
Member

Gudahtt commented Jul 18, 2019

The first improvement would probably be best to leave until later, as there are planned changes to our build system that would make that obsolete (this hasn't been made into an issue yet - that's in progress).

The second point is worth addressing now though, if only to get rid of that error about libs.js being missing in development. The approach described in the OP would certainly work, but one alternative might be using the lib.js bundle in development like we do in production.

@brad-decker brad-decker added the contributor experience An issue that impacts, or planned improvement to, the contributor experience. label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-buildSystem related to our build system contributor experience An issue that impacts, or planned improvement to, the contributor experience.
Projects
None yet
Development

No branches or pull requests

4 participants