meteor-bower
meteor-bower copied to clipboard
Control load order
I'm trying to load in react and react-router on client and server. Here's a sample repo where the `lib/bower.json' file is
{
"name": "scratch",
"version": "0.0.1",
"dependencies": {
"react" : "0.12.2",
"react-router" : "0.12.4"
},
"overrides": {
"react" : {
"main" : "react-with-addons.js",
"arch" : [ "client", "server"]
},
"react-router" : {
"arch" : [ "client", "server"]
}
},
"private": true
}
Unfortunately I'm not getting either package included on the server. In addition, react-router
runs before react
on the client. Am I doing this wrong, or are those not controllable?
@gbisheimer Do you know if load order is controllable? @illusionfield Any idea why the files aren't included on the server?
Nevermind illusion, sorry – the problem is that the feature you wrote hasn't been pushed to atmosphere yet. @lourd using meteor-bower
master should fix the inclusion problem. Sorry I can't update atmosphere.
You could try adding https://github.com/reactjs/react-meteor
and using meteor-bower
just for react-router
?
@lorensr, are you sure you can't update atmosphere? I added you a few days/weeks ago, and I can see you on this page https://atmospherejs.com/mquandalle/bower
Oh! You're right, I'm sorry, I must have been logged into a different
meteor account when I tried last. Thank you. I just published v1.3.12_3
On Thu, Mar 19, 2015 at 2:38 AM, Maxime Quandalle [email protected] wrote:
@lorensr https://github.com/lorensr, are you sure you can't update atmosphere? I added you a few days/weeks ago, and I can see you on this page https://atmospherejs.com/mquandalle/bower
— Reply to this email directly or view it on GitHub https://github.com/mquandalle/meteor-bower/issues/73#issuecomment-83446031 .
Hi All, I’m really sorry but I wasn't available for few days. I have counted already on this problem that adding this feature the sequence of loading scripts must be controlled in the future.
I think, in this case a requirements hierarchy is also needed as in terms of package.js:
use: [
"meteor",
"[email protected]"
],
I think we need something similar, I will work on it if I have a little time.
I modified the original sample repo (https://github.com/lourd/bower-react-issue) I found that the problem is not caused by the meteor-bower package, but also occurs independently. Modified repo: https://github.com/illusionfield/bower-react-issue
Thanks for taking the time and figuring that out!