title: Injecting variables into webpack
body: <p>I'm trying to inject a variable into each module within my webpack bundle in order to have debugging information for JS errors per file.  I've enabled</p>
  
  <pre><code>node: {
     __filename: true
  }
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/25553868/current-file-path-in-webpack">Current file path in webpack</a></p>
  
  <p>in my webpack.config, but I would like to inject something like</p>
  
  <pre><code>var filename = 'My filename is: ' + __filename;
  </code></pre>
  
  <p>into each module before compilation.  I've seen the <a href="http://webpack.github.io/docs/list-of-plugins.html#bannerplugin" rel="noreferrer">Banner Plugin</a> with the <code>raw</code> option but it seems this would only inject the banner outside of the webpack closure rather than my desired result of injecting script into each module.</p>