Action on every build, within ionic serve

I’ve read and experimented a great deal with this issue, but I’m not sure how to get it to work. My goal is to do something (generate a unique hash file) after each time a build is executed while running serve. I read in one github issue that the hooks do not work at all, even though they’re documented in the hooks/ I’m not sure if build:after would even be executed inside the ionic:serve, if it did get called.

So the question is, how can I execute something while ionic:serve is running, every time a rebuild is executed and completed – in other words, every time a source file has been changed and a recompile has been executed?