Skip to content

Conversation

@davidchin
Copy link
Contributor

@davidchin davidchin commented Sep 5, 2025

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_strategies experiment

Testing

See bigcommerce/checkout-sdk-js#2989

@davidchin davidchin force-pushed the lazy_strategies branch 8 times, most recently from 0c479dd to e472db6 Compare September 12, 2025 04:34
@davidchin davidchin marked this pull request as ready for review September 12, 2025 04:54
@davidchin davidchin requested review from a team as code owners September 12, 2025 04:54
@davidchin davidchin force-pushed the lazy_strategies branch 7 times, most recently from d265e0a to 3031305 Compare September 23, 2025 00:26
animesh1987
animesh1987 previously approved these changes Oct 3, 2025
animesh1987
animesh1987 previously approved these changes Oct 3, 2025
@bc-nick
Copy link
Contributor

bc-nick commented Oct 7, 2025

@davidchin hi! Looks like this PR should be taken into account here. Moved BraintreeVisaCheckout payment strategy into separate package, but did not remove previous implementation from core (plan to do it in a separate PR)

@davidchin davidchin merged commit 5197314 into master Oct 8, 2025
10 checks passed
@davidchin davidchin deleted the lazy_strategies branch October 8, 2025 00:20
@davidchin
Copy link
Contributor Author

@bc-nick Thanks, this can be done in a follow-up PR 🙂

@bc-launchbay
Copy link

checkout-js deployed to Integration US
success 20251008004202 by Launchbay

@bc-launchbay
Copy link

checkout-js deployed to Staging US
success 20251008004202 by Launchbay

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

⚡️ Lighthouse results

🖥️ Desktop:

Category Score
🟢 Performance 91
🟢 Accessibility 91
🟠 Best practices 78

📱 Mobile:

Category Score
🟠 Performance 59
🟢 Accessibility 94
🟠 Best practices 78

@bc-launchbay
Copy link

checkout-js deployed to Production US
success 20251008004202 by Launchbay

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.

7 participants