From 7438e074959337bf74a62e3d4451705130fec448 Mon Sep 17 00:00:00 2001 From: dannynelson Date: Wed, 20 Apr 2016 11:18:50 -0700 Subject: [PATCH] Update docs to externalize react/addons for newer versions of React Deprecated CommonJS react/addons entry point was removed in React 15. https://facebook.github.io/react/blog/2016/04/07/react-v15.html resolves ##325 --- CONTRIBUTING.md | 7 ++++++- docs/guides/browserify.md | 2 ++ docs/guides/karma.md | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e519e1132..27b28056b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -34,6 +34,11 @@ npm run react:13 npm run react:14 ``` +```bash +# switch to React 15 +npm run react:15 +``` + ### Running Tests diff --git a/docs/guides/browserify.md b/docs/guides/browserify.md index a964afde5..04f36d18d 100644 --- a/docs/guides/browserify.md +++ b/docs/guides/browserify.md @@ -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 ``` @@ -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'); diff --git a/docs/guides/karma.md b/docs/guides/karma.md index b72ae1d0c..381db5301 100644 --- a/docs/guides/karma.md +++ b/docs/guides/karma.md @@ -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 } @@ -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'); });