invalidate resource when watching from require's cache