evshiron / nwjs-builder-phoenix

MIT License
289 stars 77 forks source link

dependencies issues #135

Open tadada opened 5 years ago

tadada commented 5 years ago

I use webpack build my vue project, and build with "build --win --x86 --mirror https://npm.taobao.org/mirrors/nwjs/ .". But app can not run in right way, I log something then I found js stoped in a dependencies module function(macaddress module). Here is part of my package.json

  "dependencies": {
    "axios": "0.17.1",
    "color.js": "^0.1.3",
    "css-loader": "^0.26.1",
    "element-ui": "^2.4.6",
    "jquery": "^1.8.3",
    "macaddress": "^0.2.9",
    "node-sass": "^4.0.0",
    "node-webkit-updater": "^0.3.3",
    "nw": "0.14.7-sdk",
    "open": "0.0.5",
    "sass-loader": "6.0.6",
    "svg-sprite-loader": "^3.9.2",
    "url-regex": "^4.1.1",
    "vue": "^2.2.2",
    "vue-router": "^2.2.0",
    "winreg": "^1.2.4"
  },
  "devDependencies": {
   ...
  },
  "build": {
    "appId": "io.github.evshiron.nwjs-builder-phoenix.project",
    "nwVersion": "0.14.7",
    "packed": true,
    "node": true,
    "targets": [],
    "output": "./phoenix/",
    "files": [
      "./dist/*",
      "./dist/**/*",
      "./dist/**/**/*",
      "./dist/**/**/**/*"
    ],
    "outputPattern": "${NAME} ${VERSION} ${PLATFORM} ${ARCH}",
    "win": {
      "productName": "Project",
      "companyName": "idsmanager",
      "copyright": "copyright",
      "icon": "./dist/favicon.ico"
    },
    "mac": {
      "displayName": "Project",
      "copyright": "copyright",
      "icon": "./dist/favicon.icns",
      "plistStrings": {
        "CFBundleIdentifier": "io.github.evshiron.nwjs-builder-phoenix.project.modified",
        "CFBundleDocumentTypes": []
      }
    }
  },
  "main": "./dist/index.html",
  "window": {
    "title": "xxx"
  }

What did I missing? Appreciate !

tadada commented 5 years ago

By the way, I tested "nwjs-builder-phoenix-master" sample project, that I add a dependentc(macaddress) and use this module in js code, not work too.