Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript changes require a page refresh within Browsersync session #1790

Closed
retlehs opened this issue Jan 8, 2017 · 6 comments
Closed

Comments

@retlehs
Copy link
Sponsor Member

retlehs commented Jan 8, 2017

we're aware of this issue, wanted to raise it on here so that y'all know we are working on a solution.

related topic:

https://discourse.roots.io/t/sage-9-js-doesnt-update-on-reload/8474

@QWp6t QWp6t mentioned this issue Jan 10, 2017
@retlehs retlehs closed this as completed Jan 10, 2017
@andrewmartin
Copy link

Hi there, I'm hitting this issue still. I've tried following what was going on in that post, but I'm hitting a really annoying refresh loop if I make any changes to JS. Any suggestions on how to fix?

@andrewmartin
Copy link

Strangely, I changed

"publicPath": "/app/themes/mysite",

to

"publicPath": "/wp-content/themes/mysite",

And it seems to have fixed the problem. Thought I'd bring this up because I just used the default generator and didn't touch config.json, did I do some step wrong when I went through the CLI?

@retlehs
Copy link
Sponsor Member Author

retlehs commented Sep 17, 2017

the cli asked:

Path to theme directory (e.g., /wp-content/themes/themename)

and instead of entering in the correct path it sounds like you accepted the default

by default sage uses /app/themes/sage as the publicPath as we're assuming you're using a bedrock install

please use https://discourse.roots.io/ for support

@pmascis
Copy link

pmascis commented May 24, 2018

I too was receiving the refresh loop @andrewmartin mentioned when changing any JS.
I accidentally had a trailing slash at the end of my theme name, which was causing the same thing.
i.e.
"publicPath": "/wp-content/themes/mysite/"
Instead of
"publicPath": "/wp-content/themes/mysite"

Sorry to revive this, just thought I'd mention in case anyone else makes the same silly mistake.

@builtbyvern
Copy link

I don't have a trailing slash and deal with this issue. It works 90% of the time but about twice an hour I get stuck in a reload loop where I have to literally empty out every file I have, hard refresh like 10x and then resave every file til it works again.

@knowler
Copy link
Member

knowler commented Jul 6, 2018

@builtbyvern

I’ve collected a bunch of checks/fixes/solutions to Browsersync related issues on Discourse:
https://discourse.roots.io/t/sage-9-browsersync-not-updating-right/10648/11?u=knowler

The Roots Discourse is the best place to find support.

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

No branches or pull requests

5 participants