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

[SDPA-3712] reduce js bundle size #630

Merged
merged 7 commits into from
Feb 17, 2020

Conversation

tim-yao
Copy link
Contributor

@tim-yao tim-yao commented Feb 3, 2020

JIRA issue: https://digital-engagement.atlassian.net/browse/SDPA-3712

Changed

  1. Added a 'search.loadOnDemand' Tide search option to allow site remove search(this.$tideSearch) from global Vue JS instance. Which will then be loaded only on pages need it.
    This reduced 100KB in the initial page JS transferred size.
    There is no break change added. Without that new setting, it will fallback to support this.$tideSearch object.
  2. Added lodash optimization
  3. Added moment.js optimization

Screenshots

With Search load on demand mode
Homepage JS load size(before):
Screen Shot 2020-02-10 at 11 17 15 am
Homepage JS load size(after):
Screen Shot 2020-02-10 at 11 17 04 am

With Search load on demand mode, Lodash & moment.js optimisation:
Homepage JS load size(before):
Screen Shot 2020-02-17 at 1 24 06 pm

Homepage JS load size(after):
Screen Shot 2020-02-17 at 1 22 58 pm

@tim-yao tim-yao self-assigned this Feb 3, 2020
@tim-yao tim-yao changed the base branch from master to develop February 3, 2020 04:49
tim-yao and others added 3 commits February 17, 2020 12:03
* [SDPA-3712] Optimized lodash in webpack

* [SDPA-3712] moment.js optimization (#632)
@tim-yao tim-yao merged commit 8db306c into develop Feb 17, 2020
@tim-yao tim-yao deleted the feature/SDPA-3712-reduce-js-bundle-size branch February 17, 2020 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants