`preload/splash.ts` -> `preload/index.ts`
This commit is contained in:
		
							parent
							
								
									bb1505d2c8
								
							
						
					
					
						commit
						0ab15c65f1
					
				| 
						 | 
					@ -83,5 +83,10 @@ function useLoading() {
 | 
				
			||||||
// ----------------------------------------------------------------------
 | 
					// ----------------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const { appendLoading, removeLoading } = useLoading()
 | 
					const { appendLoading, removeLoading } = useLoading()
 | 
				
			||||||
window.removeLoading = removeLoading
 | 
					 | 
				
			||||||
domReady().then(appendLoading)
 | 
					domReady().then(appendLoading)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					window.onmessage = ev => {
 | 
				
			||||||
 | 
					  ev.data.payload === 'removeLoading' && removeLoading()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					setTimeout(removeLoading, 4999)
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@ export default defineConfig({
 | 
				
			||||||
      preload: {
 | 
					      preload: {
 | 
				
			||||||
        input: {
 | 
					        input: {
 | 
				
			||||||
          // You can configure multiple preload scripts here
 | 
					          // You can configure multiple preload scripts here
 | 
				
			||||||
          splash: join(__dirname, 'electron/preload/splash.ts'),
 | 
					          index: join(__dirname, 'electron/preload/index.ts'),
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        vite: {
 | 
					        vite: {
 | 
				
			||||||
          build: {
 | 
					          build: {
 | 
				
			||||||
| 
						 | 
					@ -40,7 +40,7 @@ export default defineConfig({
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      // Enables use of Node.js API in the Renderer-process
 | 
					      // Enables use of Node.js API in the Electron-Renderer
 | 
				
			||||||
      renderer: {},
 | 
					      renderer: {},
 | 
				
			||||||
    }),
 | 
					    }),
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue