Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore requires in dead branches #93

Closed
Rich-Harris opened this issue Aug 31, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@Rich-Harris
Copy link
Contributor

commented Aug 31, 2016

Via rollup/rollup#855 (comment):

if (process.env.NODE_ENV !== 'production') {
  var ReactElementValidator = require('./ReactElementValidator');
  createElement = ReactElementValidator.createElement;
  createFactory = ReactElementValidator.createFactory;
  cloneElement = ReactElementValidator.cloneElement;
}

If process.env.NODE_ENV has been rewritten as 'production' (i.e. this plugin follows rollup-plugin-replace), we should disregard the require('./ReactElementValidator').

Rich-Harris added a commit that referenced this issue Sep 2, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.