Hi guys,
I have mounted a development stack with Bedrock
+ Sage9
inside a ddev
container (docker based container) inside a WSL2
container. I am working on a Win10 environment.
So what I’m trying to achieve is basically running a yarn start
that will compile my assets and giving me access to localhost:3000
with Browsersync Hot Reloading
.
My problem is : doing that, I can’t reach my website, and I can’t understand why. I suppose it comes from my Browsersync configuration, but also it may be related to the way my ddev container expose things.
Here is my Browsersync config :
{
"open": false,
"entry": {
"main": [
"./scripts/main.js",
"./styles/main.scss",
"./scripts/modules/navbar.js"
],
"customizer": [
"./scripts/customizer.js"
]
},
"publicPath": "/app/themes/lorem",
"devUrl": "https://lorem.ddev.site",
"proxyUrl": "http://localhost:3000",
"cacheBusting": "[name]_[hash:8]",
"watch": [
"app/**/*.php",
"config/**/*.php",
"resources/views/**/*.php"
]
}
N.B: When I run a yarn start
outside my ddev
container, everything is going well ! I can reach https://localhost:3000
, and Hot Reloading is working fine.
I have read a lot of things about docker based container + Browsersync or some ways to configure Browsersync, but I can’t make anything work. Also, the fact that Sage9 used the deprecated browser-sync-webpack-plugin
is a little bit confusing for me….
So I will be glad if someone has a clue
Thanks !