| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- module.exports = {
- //路径前缀
- publicPath: "/",
- lintOnSave: true,
- productionSourceMap: false,
- chainWebpack: (config) => {
- //忽略的打包文件
- config.externals({
- 'vue': 'Vue',
- 'vue-router': 'VueRouter',
- 'vuex': 'Vuex',
- 'axios': 'axios',
- 'element-ui': 'ELEMENT',
- });
- const entry = config.entry('app');
- entry.add('babel-polyfill').end();
- entry.add('classlist-polyfill').end();
- entry.add('@/mock').end();
- },
- devServer: {
- port: 1999,
- proxy: {
- '/api': {
- //本地服务接口地址
- // target: 'http://139.9.103.171:9527',
- target: 'http://localhost:9527',
- //远程演示服务地址,可用于直接启动项目
- //target: 'https://saber.bladex.vip/api',
- ws: true,
- pathRewrite: {
- '^/api': '/'
- }
- },
- '/grid': {
- //本地服务接口地址
- target: 'http://localhost:9083',
- //远程演示服务地址,可用于直接启动项目
- //target: 'https://saber.bladex.vip/api',
- ws: true,
- // pathRewrite: {
- // '^/testapi': '/'
- // }
- },
- '/estate': {
- //本地服务接口地址
- target: 'http://localhost:2004',
- //远程演示服务地址,可用于直接启动项目
- //target: 'https://saber.bladex.vip/api',
- ws: true,
- pathRewrite: {
- '^/estate': '/'
- }
- },
- '/common': {
- //本地服务接口地址
- target: 'http://localhost:9091',
- //远程演示服务地址,可用于直接启动项目
- //target: 'https://saber.bladex.vip/api',
- ws: true,
- // pathRewrite: {
- // '^/testapi': '/'
- // }
- },
- '/vcDevice': {
- //本地服务接口地址
- target: 'http://localhost:2007',
- //远程演示服务地址,可用于直接启动项目
- //target: 'https://saber.bladex.vip/api',
- ws: true,
- // pathRewrite: {
- // '^/testapi': '/'
- // }
- },
- }
- }
- };
|