I'm using webpack-dev-server during development and have a public folder as content base containing: index.html, img/\*\*.\*.jpg.

During development in my sass file i reference images as:

```
background-image: url('img/background.jpg');

```

This works fine during development since webpack-dev-server is serving the images in the public folder.

But when I build the project and generate a dist folder that is later going to be deployed to a test server I need to rewrite all the urls in the sass files since they aren't going to be served from the root of the webserver. In my case I would like to rewrite the previous css rule as:

```
background-image: url('folder1/folder2/folder3/img/background.jpg');

```

Is this possible?