Blame view

vue.config.js 856 Bytes
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  module.exports = {
    devServer: {
      port: 3000, // 设置开发服务器端口
      open: true, // 自动打开浏览器
      proxy: {
        '/app': {
          target: 'http://localhost:8008/app', // 后端API地址
          changeOrigin: true,
          pathRewrite: {
            '^/app': ''
          }
        },
        '/callComponent': {
          target: 'http://localhost:8008/callComponent', // 后端API地址
          changeOrigin: true,
          pathRewrite: {
            '^/callComponent': ''
          }
        }
      },
      // 关键:禁止开发服务器对静态资源添加 hash
      historyApiFallback: {
        disableDotRule: true,
        rewrites: [
81955f61   wuxw   优化房屋页面
25
26
          { from: /\/img\/.*/, to: function (context) { return context.parsedUrl.pathname; } },
          { from: /\*.xlsx/, to: function (context) { return context.parsedUrl.pathname; } }
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
27
28
29
30
        ]
      }
    }
  }