travis-r6s / gridsome-starter-shopify-advanced

A Gridsome starter for Shopify, complete with authentication πŸ”

Home Page:https://gridsome-starter-shopify-advanced.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Checkout Error

rylanharper opened this issue Β· comments

Hi there! πŸ‘‹ THIS is the template I have been waiting forever for! I cannot thank you enough for your work on this!!

Small (not-so-small) bug/error when navigating back to the site from the checkout page.. Seems the pages/images do not load in due to a cache error. Its even worse when logged into a user account and doesn't allow me to navigate the site at all πŸ™ƒ

To recreate this add a product to the cart then checkout > domain.myshopify.com > then navigate back to site. I get this:

Capture

@rylanharper You're welcome πŸ™‚

Yeh, I noticed that too. Turns out service workers are hard πŸ™„I pushed an update that remove caching for the JS, and it seems to have fixed it, at least on my preview. Try changing the sw config to this (or removing completely):

{
  use: 'gridsome-plugin-service-worker',
  options: {
    staleWhileRevalidate: {
      cacheName: 'static-resources',
      routes: [/\.(?:css)$/]
    }
  }
}

Yeah service workers are insane lol πŸ‘€ Okay cool that fix seems to be working on my dev environment and images and pages are coming back in. I have a couple more questions regarding how to go about testing the user accounts while in a dev environment.. I may open another ticket for that