Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Browser reload delay #1052

Open radmedov opened 4 years ago

radmedov commented 4 years ago

This repo is currently on low maintenance. See README for details

Problem

Hi everyone, Lately, the browser reloads too early and not picking up the changes in the files. Have to reload manually one more time. So annoying. Could anyone advise how to fix it? Was trying to set reloadDelay to browserSync config, however, it isn't working.

Thank you.

GuillermoCasanova commented 4 years ago

Going through the same exact issue, I have to reload to view changes :/

I'm only running into this problem with section and snippet files. CSS and the index.liquid edits work just fine. Is it with all files for you?

cshold commented 4 years ago

I'm having the same issue with CSS and JS mostly - liquid seems to be working as expected.

I added a delay to my browsersync but it's not helping, I always have to manually reload. Seems like the file on the server isn't be cache-busted but not sure where the problem lies.

GuillermoCasanova commented 4 years ago

Bizarre that you're running into the inverse with the file types.

I ultimately gave up and went back to using V0. However, it's behaving unexpectedly where sometimes changes come through in the browser and sometimes not, so I have to save Sublime Text a couple times before the change comes through live.

This is after reinstalling npm, node, and all dependencies, short of reinstalling my OS.

lmartins commented 4 years ago

Started to see this too.

soulzzprajapati commented 4 years ago

We have noticed this issue since past few weeks. We thought it was our network winding us up. Leaving a comment to get any update on this.

dan-gamble commented 4 years ago

For what it's worth I don't think this is a Slate specific issue.

Slater are experiencing the same issue Seems the issue was apparent in Themekit too although this say's it has been fixed

radmedov commented 4 years ago

Found the workaround for this issue: Go to: node_modules/@shopify/slate-tools/tools/webpack/hot-client.js And wrap window.location.reload(); into setTimeout function. Like this:

setTimeout(function() {
    window.location.reload();
}, 1500); // Delay