refactor: minor changes
This commit is contained in:
		
							parent
							
								
									0edc38fc9d
								
							
						
					
					
						commit
						eb8b69966d
					
				| 
						 | 
				
			
			@ -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"
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,4 +1,3 @@
 | 
			
		|||
 | 
			
		||||
function domReady(condition: DocumentReadyState[] = ['complete', 'interactive']) {
 | 
			
		||||
  return new Promise(resolve => {
 | 
			
		||||
    if (condition.includes(document.readyState)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,3 @@
 | 
			
		|||
 | 
			
		||||
declare namespace NodeJS {
 | 
			
		||||
  interface ProcessEnv {
 | 
			
		||||
    NODE_ENV: 'development' | 'production'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue