This repository has been migrated. For ongoing updates, please see https://github.com/thinkjs/thinkjs/tree/master/packages/think-template-handlebars.
handlebars template adapter for ThinkJS 2.x
npm install think-template-handlebarsimport HandlebarseAdapter from 'think-template-handlebars';
think.adapter('template', 'handlebars', HandlebarseAdapter);add above code in bootstrap file, like src/common/boostrap/adapter.js.
change view type in file src/common/config/view.js,
export default {
type: 'handlebars',
adapter: {
handlebars: { //handlebars options
}
}
}you can precompile handlebars template before deployed. it will auto identified when render template.