Skip to content

Commit 23a9348

Browse files
committed
package: productName and bumps
1 parent 28060e0 commit 23a9348

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "vite-react-electron",
3+
"productName": "Electron",
4+
"private": true,
35
"version": "1.0.0",
46
"description": "Vite React Electron boilerplate.",
57
"author": "草鞋没号 <308487730@qq.com>",
@@ -16,7 +18,7 @@
1618
"electron-store": "^8.0.1"
1719
},
1820
"devDependencies": {
19-
"@types/react": "^17.0.38",
21+
"@types/react": "^17.0.39",
2022
"@types/react-dom": "^17.0.11",
2123
"@vitejs/plugin-react": "^1.1.4",
2224
"electron": "^17.0.0",

src/main/index.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import os from 'os'
2-
import { join } from 'path'
31
import { app, BrowserWindow, shell } from 'electron'
2+
import { release } from 'os'
3+
import { join } from 'path'
44
import './samples/electron-store'
55

6-
const isWin7 = os.release().startsWith('6.1')
7-
if (isWin7) app.disableHardwareAcceleration()
6+
if (release().startsWith('6.1')) app.disableHardwareAcceleration()
7+
if (process.platform === 'win32') app.setAppUserModelId(app.getName())
88

99
if (!app.requestSingleInstanceLock()) {
1010
app.quit()

0 commit comments

Comments
 (0)