title: is there a way to change the image url before load in webpack
body: <p>first all,it is a webpack request</p>
  
  <p>suppose i have a css and the content is simple like this</p>
  
  <pre><code>body{
    background: url('$my_path$/images/background.jpg')
  }
  </code></pre>
  
  <p>and my_path is a varible,and will be changed later</p>
  
  <p>and i set a loader in config file like this</p>
  
  <pre><code>...
   loaders:[
       {test: /\.(jpe?g|png|gif|svg)$/i,
              loaders: [
                  'url!my-loader'
              ]},
  ]
  </code></pre>
  
  <p>what i suppose to do is in my custome loader it can replace the variable to a specific path ,so later the url-loader can load the right image file correctly</p>
  
  <p>but i don't know how to do</p>
  
  <p>can anyone give a clue please</p>
  
  <p>thanks </p>
  
  <p>=======================</p>
  
  <p>finaly i wrote a loader to work it out</p>
  
  <pre><code>module.exports = function(content) {
      this.cacheable &amp;&amp; this.cacheable();
      var srcPath=loaderUtils.stringifyRequest(this,query.srcRoot||__dirname+"/src")).slice(1,-1);
      content=content.replace(new RegExp("%srcRoot%","g"),srcPath)
      return content;
  }
  </code></pre>
  
  <p>and in the html,i add a prefix into the url,eg %srcRoot%/images/a.jpg</p>
  
  <p>so far it is work</p>