I have the same problem.
Loop reloading browser window is very annoying. Does anyone have a solution for this?
In my common.js file there are few features that do not show errors
ive solved this issue by changing the theme name to a different name which is not equal to my website name from:
"publicPath": "/arnoud_oostveen/wp-content/themes/arnoud_oostveen",
"devUrl": "http://localhost/arnoud_oostveen/",
to:
"publicPath": "/arnoud_oostveen/wp-content/themes/ao",
"devUrl": "http://localhost/arnoud_oostveen",
Are you sure it was the theme name change? Your first devUrl
has a trailing /
at the end.
My issue was actually that I had the wrong publicPath
set. It seemed to work with and without the trailing slash on the devUrl
. Iâm all good now.
I have the same problem.
But it starts after I added a component by npm.
So I removed it but itâs still looping.
Then I check my publicPath and devUrl, trying different solutions but nothing.
Itâs really annoying.
my config.json is:
{
âentryâ: {
âmainâ: [
"./scripts/main.js",
"./styles/main.scss"
],
âcustomizerâ: [
"./scripts/customizer.js"
]
},
âwatchâ: [
âtemplates//*.php",
"src//*.phpâ
],
âpublicPathâ: âapp/themes/birdlifeâ,
âdevUrlâ: âhttp://birdlife.comâ,
âproxyUrlâ: âhttp://localhost:3000â,
âcacheBustingâ: â[name]_[hash:8]â,
âbrowsersâ: [
âlast 2 versionsâ,
âandroid 4â,
âopera 12â
]
}
Thanks
That could also be possible. I did not pay attention to this
How did you end up with this?
Try /app/
instead of app/
How does this work on MAMP, what should I set my âpublicPathâ to?
Itâs really annoying, canât get it to work what ever I change it to.
{
"entry": {
"main": [
"./scripts/main.js",
"./styles/main.scss"
],
"admin": [
"./scripts/admin.js",
"./styles/admin.scss"
]
},
"watch": [
"{inc,templates}/**/*.php"
],
"publicPath": "/wp-content/themes/theme-name",
"devUrl": "http://wp.dev/theme-name",
"proxyUrl": "http://localhost:3000",
"cacheBusting": "[name]_[hash:8]",
"browsers": [
"last 3 versions",
"android 4",
"opera 12",
"safari 8"
]
}
Mhm, I just canât get this thing to work properly:
[HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details. @ process-update.js:81
[HMR] - ./assets/scripts/main.js @ process-update.js:89
[HMR] Reloading page process-update.js:128
Iâm using this with MAMP and WP Multisite.
Working anything with JS is unusable, JS doesnât build and page is infinitely reloading.
None of the tweaks mentioned in couple of threads on this forum donât fix the issue.
do you have your wp in subdirectory? If so, your publicPath should be â/subdirectory/wp-content/themes/theme-nameâ
I have same issue, is my setting right?
Also what type of local development tool do you guys use for devepling the Sage 9, and you donât see this issue? I think it became a common issue now with MAMP~~
{
"entry": {
"main": [
"./scripts/main.js",
"./styles/main.scss"
],
"customizer": [
"./scripts/customizer.js"
]
},
"publicPath": "/wp-content/themes/sage-9.0-theme",
"devUrl": "http://localhost:8888/_auto-build-templates/wordpress-automation",
"proxyUrl": "http://localhost:3000",
"cacheBusting": "[name]_[hash:8]",
"watch": [
"app/**/*.php",
"config/**/*.php",
"resources/views/**/*.php"
]
}
Has anyone seen any way to resolve this? I used Sage 8 for everything but Sage 9, months after release, still gives me fits with stuff like this. I have to hack my way around to get this to not go into an autoreload loop and itâs to the point that I canât even continue working on the site.
My config file (and yes, the settings are correct⌠this works 90% of the time):
{
"entry": {
"main": [
"./scripts/main.js",
"./styles/main.scss"
],
"customizer": [
"./scripts/customizer.js"
]
},
"publicPath": "/wp-content/themes/client-portal",
"devUrl": "http://yesler-client-portal.local",
"proxyUrl": "http://localhost:3000",
"cacheBusting": "[name]_[hash:8]",
"watch": [
"app/**/*.php",
"config/**/*.php",
"resources/views/**/*.php"
]
}
@builtbyvern I just had the same problem and I seems like I solved it by changing publicPath from /myMultisite/wp-content/themes/sage
to /myMultisite/mySite/wp-content/themes/sage
In other words, the path is includes my subsite, not the parent site.
If youâre using Multisite and the reloading happens on a subsite, you can try what I described in another post and what solved it for me: Webpack on Multisite with subdomains continues reloading for JS changes
But of cause go sure that your config paths are set correctly.
hey,
I am also having this issue with Sage 9, after adding hamburger.js, while using MAMP and virtual hosts. I have the following config.json -
{
âentryâ: {
âmainâ: [
â./scripts/main.jsâ,
â./styles/main.scssâ
],
âcustomizerâ: [
â./scripts/customizer.jsâ
]
},
âpublicPathâ: â/wp-content/themes/newromansâ,
âdevUrlâ: âhttp://new.romansâ,
âproxyUrlâ: âhttp://localhost:3000â,
âcacheBustingâ: â[name]_[hash:8]â,
âwatchâ: [
âapp//*.php",
"config//.php",
"resources/views/**/.phpâ
]
}
My public path was original the full path from my mac hard drive, so /Users/me/projName/wp-content/âŚ
Any ideas? Itâs making my mac fan go bananas and constantly reloading.
If you are using Bedrock with Sage it should be like â/app/themes/newromansâ; I had similar constant reload issue whenever i updated a file and it all came down to a typo in my path.
Hi @builtbyvern i am having the same configuration but my website wont even load. I would really appreciate your assistance. thanks.
For those having this issue with website in subdomain using mamp This is THE SOLUTION !!!
âproxyUrlâ should has the same subdirectories structure as âdevUrlâ:
"proxyUrl": "http://localhost:3000/_auto-build-templates/wordpress-automation"
UghâŚRoots/Sage user for 5-6 years now for ALL builds and finally feel like Iâve hit a wall. I have been dealing with page refreshing loop for a week now trying EVERYTHING I can find on here, Google, SO, etc. but nothing stops it. Nothing else on the ports, changed config.json every possible way, etc. So frustrated at this point Iâm ready to give it up so I can get back to a functional dev environment. So badly want to solve thisâŚ
Problem comes when I save any js files (main, common, etc.), it starts looping. Only thing I can do is stop yarn watch, change the proxyUrl port number (ie. 3000 -> 3001) that yarn start again and try to avoid making js changes except in batches.