Closed nicksergeant closed 9 years ago
This seems to indicate there's no way to specify two different files during build: https://github.com/reactjs/react-meteor/blob/master/package.js#L35-L36 -- is this still the case?
I'll likely resort to creating my own production react-meteor package instead, but this is kind of a bummer (seems like the limitation is on Meteor's end of things).
Yeah, unfortunately it's still very difficult to add different files depending on whether you're building for development or production, and that's a known limitation of Meteor's packaging system.
The "solution" I attempted previously was removed in this commit, and I have to admit the implementation is much simpler now.
I think having separate (but hopefully related) react-meteor-{dev,prod}
packages might be a reasonable strategy until the packaging system can handle multiple configurations.
In other words, a conscious decision was made to drop support for using Facebook's version of the minified library, but I would welcome any work to reinstate that support in a cleaner way (i.e. not using something like Inject.rawHead
).
Gotcha - I may look into this. For now I forked and switched to the production version in https://github.com/nicksergeant/react-meteor. The production version of React offers some significant performance improvements that I didn't feel comfortable with not deploying :)
Will update here if I can PR a more sane switch in this core project instead.
It seems this package only includes the debug version of React, which is slower than the production version (as indicated here).