Created
July 11, 2019 22:13
-
-
Save tohagan/683eacd97b535eb78a0ed417158bfe7d to your computer and use it in GitHub Desktop.
Clear Vue Webpack console on hot reload.
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
// Clear Webpack console on hot reload. | |
// https://stackoverflow.com/a/53933757/365261 | |
// add to main.js or app.js file | |
if (module.hot) { | |
module.hot.accept(); // already had this init code | |
module.hot.addStatusHandler(status => { | |
if (status === "prepare") console.clear(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment