From cb2b4e3522cb7f426ba5ad3e68deb9e6ccc581ec Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Tue, 28 Apr 2020 12:34:05 -0400 Subject: electron simulator (#531) --- electron/.electron-vue/dev-client.js | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 electron/.electron-vue/dev-client.js (limited to 'electron/.electron-vue/dev-client.js') diff --git a/electron/.electron-vue/dev-client.js b/electron/.electron-vue/dev-client.js new file mode 100644 index 00000000..2913ea4b --- /dev/null +++ b/electron/.electron-vue/dev-client.js @@ -0,0 +1,40 @@ +const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') + +hotClient.subscribe(event => { + /** + * Reload browser when HTMLWebpackPlugin emits a new index.html + * + * Currently disabled until jantimon/html-webpack-plugin#680 is resolved. + * https://github.com/SimulatedGREG/electron-vue/issues/437 + * https://github.com/jantimon/html-webpack-plugin/issues/680 + */ + // if (event.action === 'reload') { + // window.location.reload() + // } + + /** + * Notify `mainWindow` when `main` process is compiling, + * giving notice for an expected reload of the `electron` process + */ + if (event.action === 'compiling') { + document.body.innerHTML += ` + + +
+ Compiling Main Process... +
+ ` + } +}) -- cgit v1.2.3