Wednesday 16 December 2015

environment variable question

since I'm using webpack, I have to compile it when im ready for production and my hot module reload does not work to show live edits.I want to be able to do like "npm run dev" or a similar command. In my index.html i would have a line that would be likeif( node environment = dev){ } elseif (node environment = production){ }and based on whether I type npm run dev, or npm run production. it would execute the line accordingly.Is this possible? Can I see working code?

Submitted December 16, 2015 at 07:25PM by Datnoidpoop

No comments:

Post a Comment