meteor-bower icon indicating copy to clipboard operation
meteor-bower copied to clipboard

Control load order

Open lourd opened this issue 9 years ago • 8 comments

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?

lourd avatar Mar 19 '15 06:03 lourd

@gbisheimer Do you know if load order is controllable? @illusionfield Any idea why the files aren't included on the server?

lorensr avatar Mar 19 '15 06:03 lorensr

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.

lorensr avatar Mar 19 '15 06:03 lorensr

You could try adding https://github.com/reactjs/react-meteor and using meteor-bower just for react-router?

lorensr avatar Mar 19 '15 06:03 lorensr

@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

mquandalle avatar Mar 19 '15 09:03 mquandalle

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 .

lorensr avatar Mar 19 '15 09:03 lorensr

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.

illusionfield avatar Mar 20 '15 21:03 illusionfield

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

illusionfield avatar Mar 21 '15 11:03 illusionfield

Thanks for taking the time and figuring that out!

lorensr avatar Mar 21 '15 20:03 lorensr