wowserhq / wowser

World of Warcraft in the browser using JavaScript and WebGL
MIT License
238 stars 63 forks source link

Pass NODE_ENV environment variable in to webpack #167

Open fallenoak opened 8 years ago

fallenoak commented 8 years ago

Certain modules we rely on, such as React, have checks for NODE_ENV to change behavior between development and production environments. In practice, when React is in development mode, it tends to perform quite a bit worse than when it runs in production mode.

We should add logic to copy the shell env var NODE_ENV in to webpack, and ensure that when npm run web-release is called, NODE_ENV is set to production