-
Notifications
You must be signed in to change notification settings - Fork 396
CHECKOUT-9388: Lazy load payment strategies by importing them on demand #2563
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
Conversation
0c479dd to
e472db6
Compare
d265e0a to
3031305
Compare
3031305 to
a2bdd1d
Compare
a2bdd1d to
2a1791c
Compare
2a1791c to
09653f0
Compare
…ng them on demand
…from essential package only if importing concrete implementations
09653f0 to
829a258
Compare
|
@davidchin hi! Looks like this PR should be taken into account here. Moved |
|
@bc-nick Thanks, this can be done in a follow-up PR 🙂 |
|
checkout-js deployed to Integration US |
|
checkout-js deployed to Staging US |
⚡️ Lighthouse results🖥️ Desktop:
📱 Mobile:
|
|
checkout-js deployed to Production US |
What/Why?
Lazy load payment strategies by importing them on demand. This is achieved by switching to
@bigcommerce/checkout-sdk/essential, which excludes payment integration code from its distribution bundle. To initialise a payment method, we now explicitly import its corresponding integration strategy and pass it into the initialisation method. This allows us to effectively lazy load the integration code only when needed, instead of loading all strategies upfront when only a few are applicable.See #2563 for the corresponding PR related to customer strategies.
Rollout/Rollback
Disable
CHECKOUT-9450.lazy_load_payment_strategiesexperimentTesting
See bigcommerce/checkout-sdk-js#2989