title: Webpack file-loader exclude option not working as expected
body: <p>In my webpack config, I want the file-loader plugin to drop all referenced images in the <code>./dist/images/</code> folder (including SVGs). At the same time, I would like the file-loader plugin to also drop all referenced font files (for font-awesome) in the  <code>./dist/assets/webfonts/</code> folder (this, too, includes SVGs).</p>
  
  <p>The problem I'm having is that standard SVG images are being copied to the <code>./dist/assets/webfonts/</code> AND <code>./dist/images/</code> folders and font SVGs from font-awesome are being copied to the <code>./dist/images/</code> AND <code>./dist/assets/webfonts/</code> folders.</p>
  
  <p>But worse than that, all the SVGs in the <code>./dist/images/</code> don't contain SVG data, they contain this:</p>
  
  <pre><code>module.exports = __webpack_public_path__ + "./assets/webfonts/logo-text.svg";
  </code></pre>
  
  <p>This is my current module configuration for the file-loader plugin:</p>
  
  <pre><code>{ test: /.*\.(gif|png|jpe?g|svg)$/, loader: "file-loader", options: { name: "./images/[name]_[hash:7].[ext]" }, exclude:  __dirname +  "/../src/assets/" },
  { test: /.*\.(ttf|eot|woff|woff2|svg)$/, loader: "file-loader", options: { name: "./assets/webfonts/[name].[ext]" }, exclude:  __dirname + "/../src/images/" }
  </code></pre>
  
  <p>You'll notice that for each file-loader entry, I've already excluded the folder it isn't supposed to load files from but that doesn't seem to have worked.</p>
  
  <p>Any ideas on how to fix this?</p>