Created
July 23, 2020 16:40
-
-
Save james2doyle/ec0e8b3aed3b2acdb7dd44d22f2139e1 to your computer and use it in GitHub Desktop.
Simple hot reload snippet
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
if (module.hot) { | |
// reload the page when this global code is changed | |
module.hot.accept([ | |
'./hot-reload.js', // same name as this file! | |
], window.location.reload); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment