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

Minimize js bundle sizes #3690

Merged
merged 13 commits into from
Jun 7, 2022
Merged

Minimize js bundle sizes #3690

merged 13 commits into from
Jun 7, 2022

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Jun 2, 2022

This pull request tries to minimize the javascript bundle sizes. Duplicate dependencies are merged into a common bundle.

Momentjs is replaced by dayjs, which allows for proper treeshaking.

This pr also adds webpack-bundle-analyzer as dev dependency to analyze webpack bundles.

It also contains a small refactor to use the utility method for flatpickr. (Which is no longer relevant for this pr, but improves the code)

Old

image
Total unminimized js size 4.85Mb
Transfered size from naos:

  • application_old 144KB
  • application_pack 105.97KB
  • vissualisations 94.58KB
  • series 52.13kb
  • description 40.5kb
  • exercise 40.36kb
  • submission 37.27kb
  • course 24.49kb

New

image
Total unminimized size 1.8Mb
Transfered size from naos:

  • commons 153.59 kb
  • application_old 144kb
  • application_pack 6.52kb
  • series 17.8 kb
  • vissualisations 9.02 kb
  • submission 6.42 kb
  • course 6.38 kb
  • exercise 3.33 kb
  • description 2.15kb

Todo in future prs:

  • use webpack for old application file
  • remove jquery

Closes #3667 .

@jorg-vr jorg-vr added the chore Repository/build/dependency maintenance label Jun 2, 2022
@jorg-vr jorg-vr self-assigned this Jun 2, 2022
@lgtm-com
Copy link

lgtm-com bot commented Jun 2, 2022

This pull request introduces 3 alerts when merging 9c7da8e into 923c1e2 - view on LGTM.com

new alerts:

  • 3 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Jun 2, 2022

This pull request introduces 3 alerts when merging f8b38f0 into 923c1e2 - view on LGTM.com

new alerts:

  • 3 for Unused variable, import, function or class

@lgtm-com
Copy link

lgtm-com bot commented Jun 2, 2022

This pull request introduces 1 alert when merging 15d3e35 into 923c1e2 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@jorg-vr jorg-vr temporarily deployed to naos June 2, 2022 12:25 Inactive
@jorg-vr jorg-vr marked this pull request as ready for review June 2, 2022 12:49
@jorg-vr jorg-vr requested review from chvp and a team as code owners June 2, 2022 12:49
@jorg-vr jorg-vr requested review from niknetniko and removed request for a team June 2, 2022 12:49
@jorg-vr jorg-vr merged commit 9a3cbd9 into develop Jun 7, 2022
@jorg-vr jorg-vr deleted the chore-webpack-split-chunks branch June 7, 2022 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Repository/build/dependency maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure the split chunks webpack plugin
3 participants