Skip to content

Conversation

@willrstern
Copy link

@willrstern willrstern commented Jun 13, 2016

NODE_ENV=production npm start in the Real World Example always loads Root.dev component (which includes dev tools), because NODE_ENV is never set on the client:

  • add webpack DefinePlugin for process.env.NODE_ENV

@willrstern willrstern changed the title Real World Example never loads Root.prod Add DefinePlugin for NODE_ENV on Real World Example Jun 13, 2016
@gaearon
Copy link
Contributor

gaearon commented Jun 14, 2016

This is partly intentional because just adding DefinePlugin will not be enough for a real production setup, and we might give a false impression by providing a half-working setup. This is why I opted for providing no production setup in examples at all.

I plan to fix this as part of #1800 but it will take some time. In the meantime, I would rather not introduce inconsistencies.

Thank you for taking time!

@gaearon gaearon closed this Jun 14, 2016
@willrstern
Copy link
Author

Ah, didn't know that! Thanks @gaearon for taking the time to explain. Sorry to take up repo-time on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants