Blame view

vue.config.js 1.39 KB
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
1
  module.exports = {
59fd5759   王彪总   feat(map): 替换腾讯地图...
2
3
4
5
6
7
    chainWebpack: config => {
      config.plugin('html').tap(args => {
        args[0].title = '西荣物业'
        return args
      })
    },
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
8
9
10
11
    devServer: {
      port: 3000, // 设置开发服务器端口
      open: true, // 自动打开浏览器
      proxy: {
9d019fa6   wuxw   测试OA相关流程
12
        // '/app': {
59fd5759   王彪总   feat(map): 替换腾讯地图...
13
        //   target: 'https://demo.homecommunity.cn/app', // 后端API地址
9d019fa6   wuxw   测试OA相关流程
14
15
16
17
18
19
        //   changeOrigin: true,
        //   pathRewrite: {
        //     '^/app': ''
        //   }
        // },
        // '/callComponent': {
59fd5759   王彪总   feat(map): 替换腾讯地图...
20
        //   target: 'https://demo.homecommunity.cn/callComponent', // 后端API地址
9d019fa6   wuxw   测试OA相关流程
21
22
23
24
25
        //   changeOrigin: true,
        //   pathRewrite: {
        //     '^/callComponent': ''
        //   }
        // }
59fd5759   王彪总   feat(map): 替换腾讯地图...
26
27
28
29
30
31
32
33
34
35
36
37
38
39
        '/app': {
          target: 'http://localhost:8008/app', // 后端API地址
          changeOrigin: true,
          pathRewrite: {
            '^/app': ''
          }
        },
        '/callComponent': {
          target: 'http://localhost:8008/callComponent', // 后端API地址
          changeOrigin: true,
          pathRewrite: {
            '^/callComponent': ''
          }
        }
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
40
41
42
43
44
      },
      // 关键:禁止开发服务器对静态资源添加 hash
      historyApiFallback: {
        disableDotRule: true,
        rewrites: [
81955f61   wuxw   优化房屋页面
45
46
          { from: /\/img\/.*/, to: function (context) { return context.parsedUrl.pathname; } },
          { from: /\*.xlsx/, to: function (context) { return context.parsedUrl.pathname; } }
a42b3256   wuxw   HC小区管理系统前段vue版正在开发中
47
48
49
        ]
      }
    }
59fd5759   王彪总   feat(map): 替换腾讯地图...
50
  }