I'm trying to add a few simple routes to my Meteor app, it's my first time playing with FlowRouter. I installed with:
meteor add kadira:flow-router
meteor add kadira:blaze-layout
Then, I created a lib/routes.js
file, containing this:
import '../imports/ui/body.js';
FlowRouter.route('/', {
name: 'home',
action: function(params) {
console.log("home");
BlazeLayout.render('body');
}
});
The imports/ui/body.js
file loads a few other templates, like so:
import './moment.js';
And moment.js
imports ./moment.html
, like so:
import './moment.html';
But I get this error when visiting /
:
Error: Cannot find module './moment.html'
The key thing to understand is that if I bypass FlowRouter altogether, by just putting import '../imports/ui/body.js
into my client/main.js
file, everything works fine.
Any ideas? Help is appreciated, thank you!