Skip to content
This repository has been archived by the owner on Oct 11, 2021. It is now read-only.

Bower package loads in lib/main.jsx but not in lib/transit.jsx #96

Open
ndarilek opened this issue Aug 21, 2015 · 0 comments
Open

Bower package loads in lib/main.jsx but not in lib/transit.jsx #96

ndarilek opened this issue Aug 21, 2015 · 0 comments

Comments

@ndarilek
Copy link

Loading react-bootstrap like so:

  "overrides": {
    "react-bootstrap": {
      "arch": [
        "client",
        "server"
      ]

In lib/main.jsx I can do:

const {Col, Grid, Nav, Navbar, NavItem, Row} = ReactBootstrap

And I can render react-bootstrap components client and server-side. Neat.

The problem arises when I try:

const {Pager, PageItem} = ReactBootstrap

in lib/transit.jsx. I'm told that ReactBootstrap is undefined.

I've had to result to this:

Meteor.startup(function() {
  Pager = ReactBootstrap.Pager
  PageItem = ReactBootstrap.PageItem
})

But, naturally, that's a bit ugly and I'd rather not. :)

I'm trying to use main.* to define fairly generic code that I can carry between apps mostly or highly unchanged. Is it at all possible to get access to ReactBootstrap and other server-side Bower libraries from other files loaded earlier?

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants