Skip to content

Lazy load b2b Bulk Order & Barcode Scanner #682

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

Merged
merged 1 commit into from
May 1, 2020
Merged

Conversation

aChanEP
Copy link
Contributor

@aChanEP aChanEP commented May 1, 2020

Description:

https://elasticpath.atlassian.net/browse/RS-795

This PR makes it so that bulk order, barcode scanner and all its dependancies will not be pulled down when in B2C mode.

In B2B mode bulk order will be lazy loaded after hitting the web app for the first time. Barcode scanner will be lazy loaded once the BulkOrder component is shown and opened from the header nav.

Our lighthouse score has increased by ~14 points and we are having initial pixel viewing times in ~4 seconds.

Here is a screenshot of performance from a netlify build in B2C mode:

Screen Shot 2020-05-01 at 3 12 43 PM

Linting:

  • No linting errors

Tests:

  • E2E tests (npm test run with e2e)
  • Manual tests

Documentation:

  • Requires documentation updates

@aChanEP aChanEP changed the title [WIP] Lazy load b2b Bulk Order & Barcode scanner along with 3rd party dependancies Lazy load b2b Bulk Order & Barcode Scanner May 1, 2020
@shaunmaharaj
Copy link
Contributor

LGTM! Thanks @aChanEP! 🚀

@aChanEP aChanEP merged commit dba1cb3 into master May 1, 2020
@aChanEP aChanEP deleted the feature/RS-795 branch May 1, 2020 22:08
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.

3 participants