Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Fix loading issue in Cordova apps. Now properly export the React obje…
Browse files Browse the repository at this point in the history
…ct on the client.
  • Loading branch information
ukabu committed Apr 29, 2015
1 parent ee0446c commit 5f8ad50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 27 deletions.
12 changes: 4 additions & 8 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,18 @@ Package.onUse(function(api) {
api.use("meteorhacks:inject-initial@1.0.2", "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/client-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
Expand Down
2 changes: 2 additions & 0 deletions src/client-react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
React = window.React;
delete window.React;
19 changes: 0 additions & 19 deletions src/inject-react.js

This file was deleted.

0 comments on commit 5f8ad50

Please sign in to comment.