mantrajs / mantra-sample-blog-app

A sample blog app built with Mantra

Home Page: http://mantra-sample-blog-app.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FlowRouter SSR don't work properly

ahxar opened this issue · comments

I already implementing FlowRouter SSR. but have one problem.
when defining FlowRouter.route inside function (injectDeps). SSR won't working, but after defining FlowRouter.route outside function (injectDeps) it will work.

i use kickstart-mantrajs-webpack but post in here because there more issues open, so i can have more help :D

Hey i got solution for this:

  1. import './client/main' in server.js, so all client stuff loads in server too.
  2. Only load methodStubs in client using Meteor.isClient
  3. Load all assets (if using webpack loader) inside Meteor.isClient block

SSR in MantraJS + Webpack is working now :)