king
2021-01-19 c57f6da46e2a52f7d5fb39d348d75134e57b0aca
config/index.js
@@ -9,18 +9,20 @@
    // Paths
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    // api 只代理接口,不加时会重定向页面路径
    proxyTable: {
      '/api': {
        target: 'http://192.168.1.106/mk/public/index.php/',
      '/webapi': {
        target: 'http://www.minkesoft.com/',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/api'
        }
        ws: true,
        // pathRewrite: {
        //   '^/api': ''
        // }
      }
    },
    // Various Dev Server settings
    host: '0.0.0.0', // can be overwritten by process.env.HOST
    host: 'localhost', // can be overwritten by process.env.HOST
    port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
    autoOpenBrowser: false,
    errorOverlay: true,
@@ -49,13 +51,13 @@
    // Paths
    assetsRoot: path.resolve(__dirname, '../dist'),
    assetsSubDirectory: 'static',
    assetsPublicPath: './',
    assetsPublicPath: '/',
    /**
     * Source Maps
     */
    productionSourceMap: true,
    productionSourceMap: false,
    // https://webpack.js.org/configuration/devtool/#production
    devtool: '#source-map',