title: dotenv-webpack use environment variable in webpack.config.js
body: <p>My <code>.env</code> is set up like this:</p>
  
  <pre><code>SECRET_KEY=mysecretkey123
  </code></pre>
  
  <p>My <code>webpack.config.js</code> is set up like this:</p>
  
  <pre><code>const Dotenv = require('dotenv-webpack');
  
  module.exports = {
  ...
  proxy: {
   'api': {
     target: 'foo.bar'
     headers: {'api_token': process.env.SECRET_KEY}
    }
  }
  ...
  plugins: [
      new Dotenv({
        path: '.env',
      }),
  ]
  
  }
  </code></pre>
  
  <p>However when I run my app I get an error saying that my api token is <code>undefined</code></p>
  
  <p>I know dotenv is working properly, because within my application itself I can do <code>console.log(process.env.SECRET_KEY)</code> and see my secret key, however it appears this does not expose my environment variables within my <code>webpack.config.js</code> file itself. </p>
  
  <p>Is there a way to configure dotenv-webpack to allow the use of environment variables within the <code>webpack.config.js</code>?</p>