Importing Client JS files not working with Flow Router - Any ideas?


Hey meteorites!

I’m having a difficult time importing client side javascript files with flow router. Without flow router, the imports work as expected but the second I introduce flow router the files aren’t loaded properly.
Here are what my files look like. Anybody out there ever experienced this ? You help is greatly appreciated :slight_smile:


import '../imports/startup/client'; // initialize all relevant javascript
import './main.html';


  <title>Welcome </title>
<template name="visitorLayout">
    {{> Template.dynamic template=header }}
    {{> Template.dynamic template=main    }}
    {{> Template.dynamic template=footer  }}

<template name="adminLayout">
    {{> Template.dynamic template=main   }}


import '../../ui/pages/landing_page/modernizr-2.6.2.min.js';
import '../../ui/pages/landing_page/jquery.easing.1.3.js';
import '../../ui/pages/landing_page/bootstrap.min.js';
import '../../ui/pages/landing_page/jquery.waypoints.min.js';
import './routes';


import { FlowRouter  } from 'meteor/kadira:flow-router';
import { BlazeLayout } from 'meteor/kadira:blaze-layout';

FlowRouter.route('/', {
  action() {
    BlazeLayout.render('visitorLayout', {
      header : "header",
      footer : "footer",
      main   : "index"

FlowRouter.route('/admin', {
  action() {
    BlazeLayout.render('adminLayout', {
      main   : "admin"


shouldn’t that be import './routes.js';?


If no “.js” ending is supplied in the filename, the import statement looks for routes.js!
Any other ideas ?


What does that mean exactly?


Sorry for lack of clarity and thanks for you replying! ARGGGG after two days I discovered there was a bug inside a jquery plugin I was using … :frowning: Well at least I know there wasn’t anything wrong with my methodoloy. Everything works as expected now. Cheers!