Change image url when building

I have image loaded in SASS

.view {
  background: url(../images/d.jpg);
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  height: 600px;


when I am building assets. it’s looking for the image in /app/themes/sage/dist/images/d.jpg);

whereas I want to change that to /dist/images/d.jpg without having to run SAGE_DIST_PATH=/dist/ yarn build

You didn’t update the config.json file inside your resources/assets/ folder.

So open the file with your text-editor and update the path with yours.


"publicPath": "/wp-content/themes/theme-name",
"devUrl": "",
"proxyUrl": ""