chore: VITE_DEV_SERVER_URL instead `app.isPackaged`
This commit is contained in:
		
							parent
							
								
									4a83703608
								
							
						
					
					
						commit
						a9240837be
					
				| 
						 | 
					@ -98,10 +98,9 @@ ipcMain.handle('open-win', (event, arg) => {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (app.isPackaged) {
 | 
					  if (process.env.VITE_DEV_SERVER_URL) {
 | 
				
			||||||
    childWindow.loadFile(indexHtml, { hash: arg })
 | 
					 | 
				
			||||||
  } else {
 | 
					 | 
				
			||||||
    childWindow.loadURL(`${url}#${arg}`)
 | 
					    childWindow.loadURL(`${url}#${arg}`)
 | 
				
			||||||
    // childWindow.webContents.openDevTools({ mode: "undocked", activate: true })
 | 
					  } else {
 | 
				
			||||||
 | 
					    childWindow.loadFile(indexHtml, { hash: arg })
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue