Skip to content

Instantly share code, notes, and snippets.

@tohagan
Created July 11, 2019 22:13
Show Gist options
  • Save tohagan/683eacd97b535eb78a0ed417158bfe7d to your computer and use it in GitHub Desktop.
Save tohagan/683eacd97b535eb78a0ed417158bfe7d to your computer and use it in GitHub Desktop.
Clear Vue Webpack console on hot reload.
// 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