Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

Commit

Permalink
Update docs to externalize react/addons for newer versions of React
Browse files Browse the repository at this point in the history
Deprecated CommonJS react/addons entry point was removed in React 15.
https://facebook.github.io/react/blog/2016/04/07/react-v15.html
resolves #enzymejs#325
  • Loading branch information
dannynelson committed Apr 20, 2016
1 parent 6df8701 commit 7438e07
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npm install && npm run react:14
```


### Switching between React 0.14 and React 0.13
### Switching between React 15, React 0.14 and React 0.13

```bash
# switch to React 0.13
Expand All @@ -34,6 +34,11 @@ npm run react:13
npm run react:14
```

```bash
# switch to React 15
npm run react:15
```


### Running Tests

Expand Down
2 changes: 2 additions & 0 deletions docs/guides/browserify.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ In your browserify configuration, you simply need to make sure that the followin
labeled as "external", which means they will be ignored:

```
react/addons
react/lib/ReactContext
react/lib/ExecutionEnvironment
```
Expand All @@ -26,6 +27,7 @@ var browserify = require('browserify');
var b = browserify();

// make sure to mark these as external!
b.external('react/addons');
b.external('react/lib/ReactContext');
b.external('react/lib/ExecutionEnvironment');

Expand Down
2 changes: 2 additions & 0 deletions docs/guides/karma.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ webpack: { //kind of a copy of your webpack config
},
externals: {
'cheerio': 'window',
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true
}
Expand All @@ -49,6 +50,7 @@ browserify: {
],
configure: function(bundle) {
bundle.on('prebundle', function() {
bundle.external('react/addons');
bundle.external('react/lib/ReactContext');
bundle.external('react/lib/ExecutionEnvironment');
});
Expand Down

0 comments on commit 7438e07

Please sign in to comment.