added hot reload
This commit is contained in:
parent
0281bf6035
commit
a7bdd5683b
3 changed files with 7 additions and 1 deletions
|
@ -39,7 +39,7 @@
|
|||
"watch": "tsc -w",
|
||||
"lint": "eslint -c .eslintrc --ext .ts ./src",
|
||||
"pre-build": "concurrently \"yarn && yarn run build-main\" \"cd src/renderer && yarn\"",
|
||||
"start": "yarn run pre-build && concurrently \"electron ./app/main/index.js\" \"cd src/renderer && yarn dev\"",
|
||||
"start": "yarn run pre-build && concurrently \"yarn run watch\" \"electron ./app/main/index.js\" \"cd src/renderer && yarn dev\"",
|
||||
"build-renderer": "cd src/renderer && yarn && yarn build && cd ../../",
|
||||
"test-release": "yarn && yarn build-renderer && yarn run build-main && electron-builder",
|
||||
"release": "electron-builder -mwl --publish always"
|
||||
|
|
|
@ -6,8 +6,13 @@ import { createWindow } from './utils/createWindow';
|
|||
import setupIpcComs from './utils/ipcComms';
|
||||
import { buildContextMenu, buildMenuBar } from './utils/menuUtil';
|
||||
import initSentry from './utils/sentry';
|
||||
import electronReload from 'electron-reload';
|
||||
import { PROD_HOST_URL, RENDERER_OUTPUT_DIR } from '../config';
|
||||
|
||||
if (isDev) {
|
||||
electronReload(__dirname, {}) as any;
|
||||
}
|
||||
|
||||
let tray: Tray;
|
||||
let mainWindow: BrowserWindow;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"noImplicitAny": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "app",
|
||||
|
|
Loading…
Reference in a new issue