const path = require('path');
const common = path.resolve(__dirname, '../common');
module.exports = {
  publicPath: `/${process.env.VUE_APP_ROUTER}`,
  outputDir: 'labmobile',
  productionSourceMap: false,
  configureWebpack: (config) => {
    Object.assign(config, {
      resolve: {
        alias: {
          '@': path.resolve(__dirname, './src'),
          '@c': path.resolve(__dirname, './src/components'),
          '@a': path.resolve(__dirname, './src/assets'),
          '@common': common,
        },
      },
    });
  },
  devServer: {
    port: '8001',
    proxy: {
      '/files': {
        target: 'http://broadcast.waityou24.cn',
      },
      '/freeLabel/api': {
        target: 'http://broadcast.waityou24.cn',
      },
      // [process.env.VUE_APP_BASE_API]: {
      //   target: 'http://broadcast.kqyjy.com',
      //   changeOrigin: true,
      //   ws: false,
      //   // pathRewrite: {
      //   //   ['^' + process.env.VUE_APP_BASE_API]: '',
      //   // },
      // },
    },
  },
};
