Search code examples
expressgruntjshandlebars.jsnodemon

Express / hbs not registering partial changes unless restarted


So, I'm using Express, hbs, and compass for my project. I'm also running things with nodemon to pick up any *.js changes.

Everything is working fine except I have to completely restart nodemon anytime I make changes to a partial.

I'm going to wager this has something to do with recompiling templates.

Is there a way around this? Or am I going to have to set up Grunt or something else to handle changes in everything?


Solution

  • I'd suggest using hbs-utils alongside hbs, it provides a method called registerWatchedPartials for exactly this use case.