vue.config.js 1.5 KB

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