I am trying to use blueimp image gallery in a meteor application. My image gallery works in development, however when I run it like this:
meteor --production
It does not work. It shows the iron-router splash screen. Similarly, if I deploy my app to meteor.com it does not work:
meteor deploy blueimpMeteor
However if I deploy my app in debug mode, it does work:
meteor deploy blueimpMeteorDebug --debug
What could be causing my meteor app to not work in production mode?
Thanks for providing the source. I tried a few things and found this to be the easiest:
You are not supposed to include both the jquery and non-jquery versions of the plugin along with the minified and non-minified versions. I removed all of the scripts under
client/compatibility/js
except forjquery.blueimp-gallery.min.js
.Remove the
<script>
tag fromhome.html
. In meteor you generally want to initialize your plugins from within an onRendered callback, however neither is necessary in this case.As shown here you just need to add the
data-gallery
property to your links like so:After making those changes, it worked for me in both development and production mode.