xiongzhu 3 년 전
부모
커밋
d85d27bbb4
3개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. BIN
      build/icon.icns
  2. 2 2
      package.json
  3. 6 1
      scripts/build.mjs

BIN
build/icon.icns


+ 2 - 2
package.json

@@ -2,11 +2,11 @@
   "name": "raex",
   "version": "1.0.0",
   "main": "dist/main/index.cjs",
-  "author": "草鞋没号 <308487730@qq.com>",
+  "author": "RAEX",
   "license": "MIT",
   "scripts": {
     "dev": "node scripts/watch.mjs",
-    "prebuild": "node scripts/build.mjs",
+    "prebuild": "node scripts/build.mjs $MODE",
     "build": "electron-builder",
     "init": "git config core.hooksPath .git/hooks/ && rm -rf .git/hooks && npx simple-git-hooks",
     "test:e2e": "npx playwright test",

+ 6 - 1
scripts/build.mjs

@@ -1,4 +1,9 @@
 import { build } from 'vite'
+console.log(process.argv)
+let mode = 'production'
+if (process.argv[2] === 'dev') {
+    mode = 'development'
+}
 await build({ configFile: 'packages/main/vite.config.js' })
 await build({ configFile: 'packages/preload/vite.config.js' })
-await build({ configFile: 'packages/renderer/vite.config.js' })
+await build({ configFile: 'packages/renderer/vite.config.js', mode })