vue.config.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. "mac": {
  29. "icon": "./static/image/desk-logo.ico"
  30. },
  31. "win": {
  32. "icon": "./static/image/desk-logo.ico"
  33. },
  34. "linux": {
  35. "icon": "./static/image/desk-logo.ico"
  36. },
  37. "asar":false,
  38. "nsis": {
  39. "oneClick": false,
  40. "guid": "猎豹AI聚合配送",
  41. "perMachine": true,
  42. "allowElevation": true,
  43. "allowToChangeInstallationDirectory": true,
  44. "installerIcon": "./static/image/desk-logo.ico",
  45. "uninstallerIcon": "./static/image/desk-logo.ico",
  46. "installerHeaderIcon": "./static/image/desk-logo.ico",
  47. "createDesktopShortcut": true,
  48. "createStartMenuShortcut": true,
  49. "shortcutName": "猎豹AI聚合配送"
  50. }
  51. }
  52. }
  53. }
  54. }