added hot reload

This commit is contained in:
Rushikesh Tote 2022-03-08 11:59:58 +05:30
parent 0281bf6035
commit a7bdd5683b
No known key found for this signature in database
GPG key ID: E4461ACF821B1DA8
3 changed files with 7 additions and 1 deletions

View file

@ -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"

View file

@ -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;

View file

@ -1,6 +1,7 @@
{
"compilerOptions": {
"module": "commonjs",
"esModuleInterop": true,
"noImplicitAny": true,
"sourceMap": true,
"outDir": "app",