title: Dotenv-webpack in production?
body: <p>I am trying to use the <a href="https://github.com/mrsteele/dotenv-webpack" rel="noreferrer"><code>dotenv-webpack</code></a> plugin. This works great locally. But fails when I deploy to Heroku.</p>
  
  <p>I have followed advice according to this <a href="https://github.com/mrsteele/dotenv-webpack/issues/121" rel="noreferrer">git issue</a>, but still am having issues.</p>
  
  <p>My webpack config looks like this:</p>
  
  <pre><code>const path = require('path');
  const Dotenv = require('dotenv-webpack');
  
  module.exports = {
    context: path.join(__dirname, '/src'),
  
    entry: {
      javascript: './js/index'
    },
  
  output: {
    filename: 'bundle.js',
    path: path.join(__dirname, '/dist'),
  },
  
  resolve: {
    alias: {
      react: path.join(__dirname, 'node_modules', 'react')
    },
    extensions: ['.js', '.jsx'],
  },
  
  module: {
    rules: [
    {
      test: /\.jsx?$/,
      exclude: /node_modules/,
      loaders: ['babel-loader'],
    },
    {
      test: /\.html$/,
      loader: 'file?name=[name].[ext]',
    },
   ],
  },
  plugins: [
    new Dotenv({
      path: path.resolve(__dirname,'.env')
    }),
   ]
  };
  </code></pre>
  
  <p>I am expecting that where the <code>dotenv</code> plugin is written as above, it will resolve my <code>.env</code> file (which is located at the root of the project, along with the webpack.config) upon build time, thus giving my project access to env vars. Instead, the env vars are <code>undefined</code>, in Heroku. I have an env var set in Heroku. The Key is set to something like <code>SECRET_KEY</code>. Value is set to something like <code>123456</code>. Can anyone give me some insight?</p>