title: create react app cannot read environment variable after build
body: <p>I have a react app , created with <code>create-react-app</code> then I build the app with command: <code>npm run build</code> </p>
  
  <p>It's using <code>serve</code> to run the app after build, if we start the app with development code by running <code>ENV=production npm run start</code> it can read the <code>process.env.ENV</code> variable beacause I'm adding this plugins to webpack dev config</p>
  
  <pre><code>   new webpack.DefinePlugin({
        'process.env':{
          'ENV': JSON.stringify(process.env.ENV),
        }
      }),
  </code></pre>
  
  <p>I also add the script above to webpack prod config, but if I try this command after build <code>ENV=prod serve -s build</code>, it cannot read the environment variable</p>
  
  <p>How to fix this?</p>