zhangzengfei
2021-03-29 24a6b3c3028ed77bb079b2ff76a30179c1db6c51
vue.config.js
@@ -12,8 +12,7 @@
    entry: path,
    template: 'public/index.html',
    title: chunk == 'desktop/index' ? 'SmartAI' : chunk,
    chunks: [chunk_vendor, 'chunk-common', chunk],
    faviconPath: "favicon.png"
    chunks: [chunk_vendor, 'chunk-common', chunk]
  }
  if (chunk != 'index') {
    pages[chunk].filename = 'view/' + chunk + '.html'
@@ -61,6 +60,12 @@
  },
  productionSourceMap: false,
  filenameHashing: false,
  pwa: {
    iconPaths: {
      favicon32: 'favicon.ico',
      favicon16: 'favicon.ico'
    }
  },
  devServer: {
    proxy: {
      '/track': {
@@ -69,20 +74,24 @@
        changeOrigin: true,
      },
      '/ws': {
        target: 'http://192.168.20.10:7003',
        // ws: true,
        target: 'http://192.168.21.189:7003',
        ws: true,
        changeOrigin: true,
      },
      "/data/api-v/app/findAllApp": {
        target: '/',
        // target: 'http://localhost:8080/',
        // target: '/',
        target: 'http://localhost:8080/',
        changeOrigin: true,
        pathRewrite: {
          '^/data/api-v/app/findAllApp': 'apps.json'
        }
      },
      "/api-c": {
        target: 'http://192.168.20.113:8004',
        changeOrigin: true
      },
      "/api-v": {
        target: 'http://192.168.20.10:8000',
        target: 'http://192.168.20.189:8888',
        changeOrigin: true
      },
      "/api-f": {
@@ -96,15 +105,15 @@
        changeOrigin: true
      },
      "/api-u": {
        target: 'http://192.168.20.10:8000',
        target: 'http://192.168.20.189:8888',
        changeOrigin: true
      },
      "/httpImage": {
        target: 'http://192.168.20.10:7003',
        target: 'http://192.168.20.189:7003',
        changeOrigin: true, //开启代理
      },
      "/files": {
        target: 'http://192.168.20.10:7003',
        target: 'http://192.168.20.189:7003',
        changeOrigin: true, //开启代理
      }
    }