[Storefront Preview] SCAPI cache breaker for older v2 PWA Kit (@W-15214446@) #1740
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Porting the changes from #1701. Unfortunately, while the solution/concept is still the same, the implementation had to be different.
In the older V2 PWA Kit:
StorefrontPreview
component does not have access to the commerce api clients because they're not in the same packageProxy
mechanism has already been used. So we need to add the cache breaker using the existing mechanism (seewillSendRequest
)Types of Changes
Changes
How to Test-Drive This PR
https://runtime.commercecloud.com/mobify/blitz/will/preview?path=/global/en-GB/product/25695327M?color%3DJJI15XX%26size%3D9SM%26pid%3D701644153083M
Note: to verify that the environment is actually using a bundle for the older PWA Kit, you can add an item to the cart, and that should result in an OCAPI call (not SCAPI).
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization