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?
Thanks!