vue.config.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. const { resolve } = require('path')
  2. const path = require('path')
  3. module.exports = {
  4. publicPath: "/",
  5. outputDir: "dist",
  6. assetsDir: "static",
  7. lintOnSave: false, // 关闭eslint
  8. runtimeCompiler: true,
  9. chainWebpack: config => {
  10. config.resolve.alias
  11. .set('@', resolve('src'))
  12. .set('#', resolve('static'))
  13. },
  14. pluginOptions: {
  15. 'style-resources-loader': {
  16. preProcessor: 'sass',
  17. patterns: [
  18. path.resolve(__dirname, './src/assets/styles/*.scss') //你的.scss文件所在目录
  19. ]
  20. },
  21. // 桌面应用打包配置
  22. electronBuilder: {
  23. builderOptions: {
  24. // build配置在此处
  25. // options placed here will be merged with default configuration and passed to electron-builder
  26. "productName": "liebao-web",
  27. "appId": "XXX",
  28. "publish": [
  29. {
  30. "provider": "generic",
  31. "url": "https://pc.liebaoai.cn/download/liebao-web%20Setup%200.1.0.exe",//更新服务器地址,可为空
  32. }
  33. ],
  34. "mac": {
  35. "icon": "./static/image/desk-logo.ico"
  36. },
  37. "win": {
  38. "icon": "./static/image/desk-logo.ico"
  39. },
  40. "linux": {
  41. "icon": "./static/image/desk-logo.ico"
  42. },
  43. "asar": false,
  44. "nsis": {
  45. "oneClick": false,
  46. "guid": "猎豹AI聚合配送",
  47. "perMachine": true,
  48. "allowElevation": true,
  49. "allowToChangeInstallationDirectory": true,
  50. "installerIcon": "./static/image/desk-logo.ico",
  51. "uninstallerIcon": "./static/image/desk-logo.ico",
  52. "installerHeaderIcon": "./static/image/desk-logo.ico",
  53. "createDesktopShortcut": true,
  54. "createStartMenuShortcut": true,
  55. "shortcutName": "猎豹AI聚合配送"
  56. }
  57. }
  58. }
  59. }
  60. }