mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 11:52:07 +08:00
热更
This commit is contained in:
@@ -13,6 +13,12 @@ module.exports = {
|
||||
* 安装
|
||||
*/
|
||||
install (eeApp) {
|
||||
// 开发环境,代码热更新开启时,会导致托盘中有残影
|
||||
// 目前没有找到合适的解决方案
|
||||
// 启用热更新功能时,不加载该模块
|
||||
// 如果调试该模式,请使用dev模式
|
||||
if (process.env.EE_SERVER_ENV == 'local' && process.env.HOT_RELOAD) return;
|
||||
|
||||
eeApp.logger.info('[preload] load tray module');
|
||||
const trayConfig = eeApp.config.tray;
|
||||
const mainWindow = eeApp.electron.mainWindow;
|
||||
|
||||
19
package.json
19
package.json
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "ee",
|
||||
"version": "2.1.2",
|
||||
"version": "2.1.3",
|
||||
"description": "A fast, desktop software development framework",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
"start": "electron . ",
|
||||
"dev": "electron . --env=local",
|
||||
"hot": "nodemon",
|
||||
"test": "set DEBUG=* && electron . --env=local",
|
||||
"build-w": "electron-builder -w --ia32",
|
||||
"build-w-64": "electron-builder -w --x64",
|
||||
@@ -16,6 +17,19 @@
|
||||
"compress": "node ./node_modules/ee-core/bin/tools compress",
|
||||
"restore": "node ./node_modules/ee-core/bin/tools restore"
|
||||
},
|
||||
"nodemonConfig": {
|
||||
"watch": [
|
||||
"electron/",
|
||||
"main.js"
|
||||
],
|
||||
"ignore": [],
|
||||
"ext": "js,json",
|
||||
"verbose": true,
|
||||
"exec": "electron . --env=local --hot-reload=1",
|
||||
"restartable": "hr",
|
||||
"colours": true,
|
||||
"events": {}
|
||||
},
|
||||
"build": {
|
||||
"productName": "ee",
|
||||
"appId": "com.electron.ee",
|
||||
@@ -92,7 +106,8 @@
|
||||
"electron-builder": "22.10.4",
|
||||
"eslint": "^5.13.0",
|
||||
"eslint-config-egg": "^7.1.0",
|
||||
"eslint-plugin-prettier": "^3.0.1"
|
||||
"eslint-plugin-prettier": "^3.0.1",
|
||||
"nodemon": "^2.0.16"
|
||||
},
|
||||
"dependencies": {
|
||||
"dayjs": "^1.10.7",
|
||||
|
||||
Reference in New Issue
Block a user