正在显示
2 个修改的文件
包含
0 行增加
和
41 行删除
.electron-vue/dev-client.js
deleted
100644 → 0
| 1 | -const hotClient = require('webpack-hot-middleware/client?noInfo=true&reload=true') | ||
| 2 | - | ||
| 3 | -hotClient.subscribe(event => { | ||
| 4 | - /** | ||
| 5 | - * Reload browser when HTMLWebpackPlugin emits a new index.html | ||
| 6 | - * | ||
| 7 | - * Currently disabled until jantimon/html-webpack-plugin#680 is resolved. | ||
| 8 | - * https://github.com/SimulatedGREG/electron-vue/issues/437 | ||
| 9 | - * https://github.com/jantimon/html-webpack-plugin/issues/680 | ||
| 10 | - */ | ||
| 11 | - // if (event.action === 'reload') { | ||
| 12 | - // window.location.reload() | ||
| 13 | - // } | ||
| 14 | - | ||
| 15 | - /** | ||
| 16 | - * Notify `mainWindow` when `main` process is compiling, | ||
| 17 | - * giving notice for an expected reload of the `electron` process | ||
| 18 | - */ | ||
| 19 | - if (event.action === 'compiling') { | ||
| 20 | - document.body.innerHTML += ` | ||
| 21 | - <style> | ||
| 22 | - #dev-client { | ||
| 23 | - background: #4fc08d; | ||
| 24 | - border-radius: 4px; | ||
| 25 | - bottom: 20px; | ||
| 26 | - box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.3); | ||
| 27 | - color: #fff; | ||
| 28 | - font-family: 'Source Sans Pro', sans-serif; | ||
| 29 | - left: 20px; | ||
| 30 | - padding: 8px 12px; | ||
| 31 | - position: absolute; | ||
| 32 | - } | ||
| 33 | - </style> | ||
| 34 | - | ||
| 35 | - <div id="dev-client"> | ||
| 36 | - Compiling Main Process... | ||
| 37 | - </div> | ||
| 38 | - ` | ||
| 39 | - } | ||
| 40 | -}) |
| ... | @@ -39,7 +39,6 @@ function logStats(proc, data) { | ... | @@ -39,7 +39,6 @@ function logStats(proc, data) { |
| 39 | 39 | ||
| 40 | function startRenderer() { | 40 | function startRenderer() { |
| 41 | return new Promise((resolve) => { | 41 | return new Promise((resolve) => { |
| 42 | - rendererConfig.entry.renderer = [path.join(__dirname, 'dev-client')].concat(rendererConfig.entry.renderer) | ||
| 43 | rendererConfig.mode = 'development' | 42 | rendererConfig.mode = 'development' |
| 44 | const compiler = webpack(rendererConfig) | 43 | const compiler = webpack(rendererConfig) |
| 45 | hotMiddleware = webpackHotMiddleware(compiler, { | 44 | hotMiddleware = webpackHotMiddleware(compiler, { | ... | ... |
-
请 注册 或 登录 后发表评论