refactor: minor changes

This commit is contained in:
Paul committed 2022-06-06 21:23:25 +03:00
1 parent 0edc38fc9d
commit eb8b69966d
5 files changed
+4 -7

No files matched your search

+1 -1
View File
@@ -30,7 +30,7 @@
},
"runtimeArgs": [
"--remote-debugging-port=9229",
"${workspaceRoot}/dist/main/index.cjs"
"${workspaceRoot}/dist/electron/main/index.cjs"
],
"envFile": "${workspaceFolder}/.vscode/.debug.env"
},
+2 -2
View File
@@ -15,9 +15,9 @@ if (!app.requestSingleInstanceLock()) {
process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'
let win: BrowserWindow | null = null
// Here, you can also use other preload
// Here you can add more preload scripts
const splash = join(__dirname, '../preload/splash.js')
// 🚧 Use ['ENV_NAME'] avoid vite:define plugin
// 🚧 Use ['ENV_NAME'] to avoid vite:define plugin
const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
async function createWindow() {
-1
View File
@@ -1,4 +1,3 @@
function domReady(condition: DocumentReadyState[] = ['complete', 'interactive']) {
return new Promise(resolve => {
if (condition.includes(document.readyState)) {
+1 -2
View File
@@ -1,9 +1,8 @@
export { }
declare global {
interface Window {
// Expose some Api through preload script
// Expose API through preload script
fs: typeof import('fs')
ipcRenderer: import('electron').IpcRenderer
removeLoading: () => void
Vendored
-1
View File
@@ -1,4 +1,3 @@
declare namespace NodeJS {
interface ProcessEnv {
NODE_ENV: 'development' | 'production'