Skip to content Skip to sidebar Skip to footer

Handlebars Precompile Type Error

I'm getting typeError in my handlebars precompiled templates After looking around stackoverflow seems the issue is related to compatibility issues between the task compiler and han

Solution 1:

Found the answer here: https://github.com/gruntjs/grunt-contrib-handlebars/issues/60

handlebars: {
    compile: {
        files: {
            "public/js/templates/templates.js": "public/js/templates/*.hbs"
        },
        options: {
            namespace: 'Handlebars.templates',
            processName: function(filePath) {
                var pieces = filePath.split("/");
                return pieces[pieces.length - 1].replace('.hbs', ''); 
                }
        }
    }
}

Post a Comment for "Handlebars Precompile Type Error"