Duplicate Electron Instance
See original GitHub issueWhen vite.config.js is modified, vite spawn a new instance instead of closing the previous one.
export default defineConfig({
base: './',
plugins: [
jsx({}),
vue({}),
electron({
main: {
entry: 'src/main.ts',
},
}),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
build: {
minify: process.env.NODE_ENV === 'production',
}
})
Note: I used this in my electron project without using Boilerplate with the configuration as in the snippet.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How to prevent multiple instances in Electron - Stack Overflow
If the instance fails to acquire the lock, it means that it's a duplicate instance which, in this case, we want to close....
Read more >Prevent duplicate instances of the same window, invoked by ...
Prevent duplicate instances of the same window, invoked by different processes, in an electron app. Author: Ganesh Rathinavel; License: MIT ...
Read more >'Second-instance' fires instead of 'open-url' in electron on mac
When you open the app from the finder/launch pad, the second-instance event will fire when using the protocol link. To Reproduce. Clone the ......
Read more >Chapter 5. Working with multiple windows - Electron in Action
Tracking multiple windows using the JavaScript Set data structure; Facilitating communication between the main process and multiple renderer processes; ...
Read more >App Showcase | Electron
Cloud-based multiplatform clipboard manager that allows you to access, view, and manage your copy history. Website. Productivity. Cozy Desktop.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @caoxiemeihao
https://github.com/SupianIDz/demo-plugin-vite-electron
Then edit and save vite.config.ts
https://user-images.githubusercontent.com/37969970/177026779-3c71f393-2084-4b15-a2ed-52651cab9235.mp4
Hi, thanks