vue.config.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. "asar":false,
  37. "nsis": {
  38. "oneClick": false,
  39. "guid": "猎豹AI聚合配送",
  40. "perMachine": true,
  41. "allowElevation": true,
  42. "allowToChangeInstallationDirectory": true,
  43. "installerIcon": "./static/image/desk-logo.ico",
  44. "uninstallerIcon": "./static/image/desk-logo.ico",
  45. "installerHeaderIcon": "./static/image/desk-logo.ico",
  46. "createDesktopShortcut": true,
  47. "createStartMenuShortcut": true,
  48. "shortcutName": "猎豹AI聚合配送"
  49. }
  50. }
  51. }
  52. }
  53. }