Skip to content

Commit

Permalink
chore(README): Remove section on browserify
Browse files Browse the repository at this point in the history
This section is no longer needed as browserify will evaluate boolean
vars and remove deadcode
  • Loading branch information
BerkeleyTrue committed May 22, 2018
1 parent 6101286 commit 52761cf
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ This is a mirror of Facebook's (FB) [warning](https://github.com/facebook/fbjs/b
If you believe a feature is missing than please open a feature request [there](https://github.com/facebook/fbjs).
If it is approved and merged in that this module will be updated to reflect that change, otherwise this module will not change.

## Browserify

When using [browserify](http://browserify.org/), the `browser.js` file will be imported instead of `invariant.js` and browserify will be told to transform the file with [envify](https://github.com/hughsk/envify). The only difference between `browser.js` and `invariant.js` is the `process.env.NODE_ENV` variable isn't cached. This, in combination with envify and (optionally) [uglifyjs](https://github.com/mishoo/UglifyJS), will result in a noop in production environments. Otherwise behavior is as expected.

## Use in Production

It is recommended to add [babel-plugin-dev-expression](https://github.com/4Catalyzer/babel-plugin-dev-expression) with this module to remove warning messages in production.
Expand Down

0 comments on commit 52761cf

Please sign in to comment.