ソースを参照

feat: 打包配置调整

chenhao 2 年 前
コミット
30a91010eb

+ 1 - 0
electron-builder.json5

@@ -8,5 +8,6 @@
   files: ['dist/electron/**/*'],
   win: {
     target: 'portable',
+    "icon": "electron/build/icons/icon.ico"
   },
 }

BIN
electron/build/icons/icon.ico


+ 0 - 5
electron/electron.d.ts

@@ -1,5 +0,0 @@
-declare namespace NodeJS {
-  interface ProcessEnv {
-    PRELOAD_PATH: string
-  }
-}

+ 2 - 0
electron/main/main.ts

@@ -13,6 +13,7 @@ async function createWindow() {
     width: 520,
     height: 150,
     frame: false,
+    icon: path.join(__dirname, './icons/icon.png'),
     resizable: false,
     transparent: true,
     show: true,
@@ -27,6 +28,7 @@ async function createWindow() {
     height: 880,
     frame: false,
     center: true,
+    icon: path.join(__dirname, './icons/icon.png'),
     resizable: false,
     fullscreen: true,
     fullscreenable: true,

BIN
electron/main/public/icons/icon.png


+ 1 - 2
package.json

@@ -13,7 +13,6 @@
     "check": "vue-tsc --noEmit",
     "build": "cross-env ONLY_WEB=1 && vue-tsc --noEmit && vite build",
     "build:electron": "vite build && electron-builder",
-    "electron-builder": "electron-builder",
     "preview": "vite preview",
     "prepare": "husky install"
   },
@@ -21,7 +20,7 @@
     "@element-plus/icons-vue": "2.0.10",
     "@vueuse/core": "9.3.0",
     "axios": "0.27.2",
-    "big.js": "^6.2.1",
+    "big.js": "6.2.1",
     "copy-to-clipboard": "3.3.2",
     "crypto-js": "4.1.1",
     "dayjs": "1.11.5",

+ 1 - 8
vite.config.ts

@@ -63,14 +63,7 @@ export default defineConfig({
   server,
 })
 
-const manualChunks = [
-  // 'echarts',
-  // "lodash-es",
-  // "dayjs",
-  // "vue-echarts",
-  // 'element-plus',
-  // "zrender",
-]
+const manualChunks = []
 
 const IMAGE_EXT = /\.(png|jpg|jpeg|gif|webp)$/
 const SVG_EXT = /\.(svg)$/