Absolute paths for sage source files when running gulp serve

The following resources are being written as absolute paths using the production URL not the URL I configured in the manifest.json.

“config”: {
“devUrl”: "http://localhost:8888/ "
},

how do I change the following

http://example.com/wp-content/themes/sage-8.4.2/dist/styles/main.css
http://example.com/wp-content/themes/sage-8.4.2/dist/scripts/main.js

to this when developing locally

http://localhost:8888/wp-content/themes/sage-8.4.2/dist/styles/main.css
http://localhost:8888//wp-content/themes/sage-8.4.2/dist/scripts/main.js

What is “gulp serve”? Are you talking about gulp watch? BrowserSync automatically does that for you

PS. Please use Bedrock

Hey Ben,

Thanks for the reply, yes I meant gulp watch. BrowserSync does not appear to be displaying those URLS as relative.

To provide more info I’m using MAMP 3.5 locally and trying to deploy to Pantheon. I am interested in using Bedrock, but pretty sure that it is not supported on Pantheon. I will pend some time this week looking at Bedrock and Trellis and consider moving over to DigitalOcean, but I have active projects on Pantheon that I need to support for the time being.

Any help would be much apprecated.

Thanks,
Patrick

Ended up spending some time and getting Bedrock and Trellis set up with DigitalOcean, was a bit of a learning curve but seems to be working fine. When I did this the above issue resolved itself.

2 Likes