I\'m using handlebars.js and I want to start precompiling everything, but I can\'t seem to find a way to precompile the partials. The majority of my templates are actually parti
Instead of replacing all the registered partials I recommend instead explicitly adding the partials, possibly filtering them as well such as:
Object.entries(Handlebars.templates).forEach(([k, v]) => { if ( k.indexOf('partial') != -1 ) Handlebars.partials[k] = v })
In this case we only insert precompiled templates that contain "partial" in the name. This would allow you to either store these in a partials/
subfolder or within the name such as some-partial.hbs