mantrajs / mantra-sample-blog-app

A sample blog app built with Mantra
http://mantra-sample-blog-app.herokuapp.com/
MIT License
296 stars 104 forks source link

FlowRouter SSR don't work properly #106

Closed ahmad-safar closed 8 years ago

ahmad-safar commented 8 years ago

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

ahmad-safar commented 8 years ago

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 :)