Run script when a certain file changes?

I want to minify my javascript file when it changes. However, restarting the server is unnecessary since I can just run the minify script. Is there any way to achieve this?

Not with any Glitch-specific functionality, as things like watch.json just allow you to change the restart and install behaviors. But you could use that alongside the watch flag in Webpack, for example.