Using done-ssr/import

Hi guys

I want to make a handelbars ssr helper using done-ssr/import to render some components.

Something like this

Handlebars.registerHelper('renderStache', function(pathToStache) {
    var doneSsrImport = require("done-ssr/import");

    return doneSsrImport (pathToStache).then(function(buildFunction){
        var context = {
            title: 'title1',
            description: 'description1',
            type: 'type1'
        return buildFunction(context)

I have installed done-ssr.
But when I try to perform this helper I have got an error.
Error: Cannot find module ‘@loader’ in done-ssr/import
In the source of done-ssr/import I can see
var loader = require("@loader");
It looks like I didn’t do some steps or maybe some requirement are needed.

Could you help me? What shall I do?


Is this client code? done-ssr/import is meant to be used in client-side Steal code.

No, this code will be performed at the server side.
The task is to render only some components at the server side not all. Can done-ssr help me do it?

It depends, is this code that you are requiring from within Node like:


Or is this inside of your app that done-ssr is loading? If the former, it’s not for this purpose.