-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS files loading too late in the build process #14
Comments
In a fit of desperation I have tried the following:
Then I:
Would appreciate any insights you might have. Otherwise, I'll probably need to go with a different solution for configuring my bootstrap. 😦 |
Well, meteor loads all packages in the order defined in the |
Thanks for getting back to me. :) Hmm. I should have mentioned that bootstrap was imported before x-editable bootstrap in For now I have I am happy to set up a stripped down sample repo if you have time to take a quick look at it? |
I think I already know where the problem is. I include the javascript while processing the |
Ugh. That seems like a pretty significant issue with this package and/or Meteor's internals. Would it be possible to read in the |
It is sadly the only way of even accessing a file during the build process but the behavior is technically correct. Meteor lacks a default way for configuring packages, that would be the right way to go. |
Did you consider configuring via |
Wouldn't work either. The problem is that i need a hook to tell meteor to include files depending on the configuration. The build plugin is the only hook i know of, which allows to dynamically create js/css and include it into the app. But at that point where the build plugin starts, it's already to late to include files before packages do. |
Just wanted to follow up on this - didn't anyone yet find a solution for that? We're on the same boat with x-editable here but basically bootstrap js-dependencies might even be a problem in other cases in the future... |
One hour trying to figure out why hinas:meteor-bootstrap-confirmation stopped working after I installed nemo64:bootstrap. I leave this comment in case it happens to someone else. |
It seems like the only way to customize Bootstrap, and have it's assets be available for other addons, is to build your own Bootstrap package. It's less hard than it sounds. I modified this script for that purpose: https://github.com/mizzao/meteor-bootstrap-3/blob/master/update.sh |
They should have a way to define loading order. If you start a project from scratch it is not a major problem but as soon as you try to convert a older project you end up spending more that you should. |
I am trying to get nate-strauser:x-editable-bootstrap working with
nemo64:bootstrap
.nate-strauser:x-editable-bootstrap
uses mizzao:bootstrap-3 by default and it works fine.However, when modify it to use
nemo64:bootstrap
instead, it throws the exception$.fn.popover.Constructor.DEFAULTS
undefined in the following code:$.fn.popover.Constructor.DEFAULTS
is eventually defined. Unfortunately it happens later in the loading sequence.I read through the Meteor docs and Meteor github issue and tried playing around with the location of the javascript files on the client, e.g.
/packages/bootstrap/bootstrap/js/*.js
to see if I could force them to load earlier. Unfortunately, no luck. (mizzao:bootstrap-3
adds them in/packages/mizzao:bootstrap-3/bootstrap-3/js
).I'm wondering if you have any ideas or suggestions for how to get this working?
Many thanks!
The text was updated successfully, but these errors were encountered: