Added checking for "watch" or "build" state to guide minification