Created
April 28, 2015 20:56
-
-
Save ukabu/1c49dc601bc8ebb13fed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index b70f4ad..4dddb4a 100644 | |
--- a/package.js | |
+++ b/package.js | |
@@ -29,22 +29,18 @@ Package.onUse(function(api) { | |
api.use("meteorhacks:[email protected]", "server"); | |
api.addFiles([ | |
+ // On the client, we use un-minified React, Meteor will minimize when building for prod. | |
"vendor/react-with-addons-" + reactVersion + ".js", | |
- "vendor/react-with-addons-" + reactVersion + ".min.js" | |
- ], "client", { | |
- isAsset: true | |
- }); | |
+ "src/window-react.js" | |
+ ], "client"); | |
api.addFiles([ | |
- // On the client, we inject a <script> tag to load the appropriate | |
- // version of React according to process.env.NODE_ENV. | |
- "src/inject-react.js", | |
// On the server, we use the modules that ship with react. | |
"src/require-react.js" | |
], "server"); | |
// This React variable is defined in src/require-react.js. | |
- api.export("React", "server"); | |
+ api.export("React"); | |
// Meteor-enabled components should include the ReactMeteor mixin via | |
// React.createClass({ mixins: [ReactMeteor.Mixin], ... }) or just | |
diff --git a/src/window-react.js b/src/window-react.js | |
new file mode 100644 | |
index 0000000..aef8a22 | |
--- /dev/null | |
+++ b/src/window-react.js | |
@@ -0,0 +1,2 @@ | |
+React = window.React; | |
+delete window.React; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment