replace url with the VITE_DEV_SERVER_URL env key in vite
This commit is contained in:
		
							parent
							
								
									4d129d0c5c
								
							
						
					
					
						commit
						009e39319c
					
				| 
						 | 
					@ -26,7 +26,7 @@ let win: BrowserWindow | null = null
 | 
				
			||||||
// Here, you can also use other preload
 | 
					// Here, you can also use other preload
 | 
				
			||||||
const preload = join(__dirname, '../preload/index.js')
 | 
					const preload = join(__dirname, '../preload/index.js')
 | 
				
			||||||
// 🚧 Use ['ENV_NAME'] avoid vite:define plugin
 | 
					// 🚧 Use ['ENV_NAME'] avoid vite:define plugin
 | 
				
			||||||
const url = `http://${process.env['VITE_DEV_SERVER_HOST']}:${process.env['VITE_DEV_SERVER_PORT']}`
 | 
					const url = process.env.VITE_DEV_SERVER_URL as string;
 | 
				
			||||||
const indexHtml = join(ROOT_PATH.dist, 'index.html')
 | 
					const indexHtml = join(ROOT_PATH.dist, 'index.html')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async function createWindow() {
 | 
					async function createWindow() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue