i'm having a very odd issue with the color swatches and product attribute such as size (drop down menu)
when I click on a configurable product that has color swatch and a size attribute (drop down format) for the first time the two options simply don't show on the page. but when I refresh the page they become available.
it's just that I wouldn't want this issue to occur when the store goes live.
Do cache:flush after implementing the changes to avoid such an issue.
The data fetched from caching may cause this issue.
I hope it helps.