Created
September 10, 2019 13:33
-
-
Save honzabrecka/855b488b5a4a3afe18745251f51529b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// require without cache | |
const __r = (m) => { delete require.cache[require.resolve(m)]; return require(m) } | |
const reload = () = { | |
Object.keys(require.cache).forEach((module) => { | |
delete require.cache[module] | |
require(module) | |
}) | |
} | |
global.__r = __r | |
global.reload = reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment