I have problems getting HMR to work. I’m new to the Roots ecosystem, so guess I’m missing something here…
Here’s how I (tried) to install Wordpress with Sage:
used trellis-cli to setup a new project to mytest
navigated to mytest/site/web/app/themes to run composer create-project roots/sage mysage
composer require roots/acorn
trellis up
activated mysage theme
in mysage run yarn dev
Wordpress seems to work fine. Changes to theme files are reflected after a manual reload.
Hot reload is not working though. When I open the browser console, I can see errors popping up every few seconds: GET http://mytest.test/__hmr net::ERR_ABORTED 404 (Not Found)
I guess I have misconfigured something here? Can anyone help me to dig in the right places?
What version of bud are you using? You may try to upgrade to 5.7.6.
(In your theme folder, in package.json change all occurences of 5.7.x to 5.7.6. Then run yarn)
Nevermind… it’s working now. While browsing through the configuration files (package.json, theme.json, etc.) I revisited bud.config.js and tried connecting to the IP instead of the proxy.
/**
* Target URL to be proxied by the dev server.
*
* This should be the URL you use to visit your local development server.
*/
.proxy("http://mytest.test")
/**
* Development URL to be used in the browser.
*/
.serve("http://0.0.0.0:80");
When I use the default serve settings it reloads my changes by scss but changes in Typescript it gives me an notice Nothing hot updated.
I installed browsersync but when I open the localhost URL it gives me HMR errors.