const FileManagerPlugin = require('filemanager-webpack-plugin')
module.exports = {
  productionSourceMap: false,
  assetsDir: "s",
  lintOnSave: false,
  configureWebpack: {
    plugins: [
      new FileManagerPlugin({
        // 注意！记得这里需要加一层events节点，否则会报错噢，宝
        events: {
          onEnd: {
            delete: [
              './setup-project-manager-ui.tar.gz',
            ],
            archive: [{
              source: './dist',
              destination: './setup-project-manager-ui.tar.gz',
              format: 'tar',
              options: {
                gzip: true,
                gzipOptions: {
                  level: 1
                },
                globOptions: {
                  nomount: true
                }
              }
            }]
          }
        }
      })
    ]
  },
  devServer: {
    inline: true,
    disableHostCheck: true,
    port: 8085,
    hot: true, //自动保存
    proxy: {
      "/m": {
       // target: "http://192.168.0.98:11019",
        target: 'http://127.0.0.1:18001',
        //target: 'http://192.168.0.250:18001',
        changeOrigin: true,
        secure: false
      }
    },
  },
};
