const { resolve } = require('path')
const path = require('path')
module.exports = {
  publicPath: "/",
  outputDir: "dist",
  assetsDir:"static",
  lintOnSave: false, // 关闭eslint
  runtimeCompiler: true,
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('#', resolve('static'))
  },
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'sass',
      patterns: [
        path.resolve(__dirname, './src/assets/styles/*.scss')      //你的.scss文件所在目录
      ]
    },
    // 桌面应用打包配置
    electronBuilder: {
      builderOptions: {
        // build配置在此处
        // options placed here will be merged with default configuration and passed to electron-builder
        "productName": "liebao-web",
        "appId": "XXX",
        "mac": {
          "icon": "./static/image/desk-logo.ico"
        },
        "win": {
          "icon": "./static/image/desk-logo.ico"
        },
        "linux": {
          "icon": "./static/image/desk-logo.ico"
        },
        "asar":false,
        "nsis": {
          "oneClick": false,
          "guid": "猎豹AI聚合配送",
          "perMachine": true,
          "allowElevation": true,
          "allowToChangeInstallationDirectory": true,
          "installerIcon": "./static/image/desk-logo.ico",
          "uninstallerIcon": "./static/image/desk-logo.ico",
          "installerHeaderIcon": "./static/image/desk-logo.ico",
          "createDesktopShortcut": true,
          "createStartMenuShortcut": true,
          "shortcutName": "猎豹AI聚合配送"
        }
      }
    }
  }
}