瀏覽代碼

打包相关

zhangjie 2 年之前
父節點
當前提交
86abcc7bed
共有 3 個文件被更改,包括 14 次插入11 次删除
  1. 4 1
      README.md
  2. 2 1
      src/background.js
  3. 8 9
      vue.config.js

+ 4 - 1
README.md

@@ -122,5 +122,8 @@ const extraPath =
 
 - 32/64 切换,`"postinstall": "electron-builder install-app-deps --arch=ia32"`
 
+- npm config set registry "https://registry.npm.taobao.org/"
+- npm config set ELECTRON_MIRROR "https://npmmirror.com/mirrors/electron/"
+- npm config set ELECTRON_CUSTOM_DIR "v{{ version }}"
 
-- ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ yarn install  
+* ELECTRON_MIRROR=https://npmmirror.com/mirrors/electron/ yarn install

+ 2 - 1
src/background.js

@@ -33,7 +33,8 @@ function createWindow() {
     useContentSize: true,
     webPreferences: {
       nodeIntegration: true,
-      webSecurity: false
+      webSecurity: false,
+      enableRemoteModule: true
     }
   });
 

+ 8 - 9
vue.config.js

@@ -9,15 +9,14 @@ var config = {
     electronBuilder: {
       externals: [],
       builderOptions: {
-        // extraFiles: [
-        //   "extra/scan/**",
-        //   "extra/database/org.rdb",
-        //   "config.sample.json",
-        //   "extra/imagemagick/**",
-        //   "extra/zxing/**",
-        //   "extra/zxingA/**",
-        // ],
-        extraFiles: ["extra/**"],
+        extraFiles: [
+          "extra/scan/**",
+          "extra/database/org.rdb",
+          "config.sample.json",
+          "extra/imagemagick/**",
+          "extra/zxing/**",
+          "extra/zxingA/**",
+        ],
         win: {
           target: "portable",
           signAndEditExecutable: false