Skip to content

Instantly share code, notes, and snippets.

@nightfly19
Created October 4, 2013 03:04
Show Gist options
  • Select an option

  • Save nightfly19/6820352 to your computer and use it in GitHub Desktop.

Select an option

Save nightfly19/6820352 to your computer and use it in GitHub Desktop.
reload-file.js
module.exports = function(module){
try{
delete require.cache[require.resolve(module)];
}
catch(err){
console.log(err);
}
//console.log(require.cache);
return require(module);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment