resolve dependencies and properly watch source files