/* * @Description: Vue配置文件 * @Author: ligy * @Date: 2022-02-17 11:34:23 * @LastEditTime: 2022-05-30 10:00:50 */ module.exports = { //路径前缀 publicPath: "/", lintOnSave: false, productionSourceMap: false, chainWebpack: config => { //忽略的打包文件 config.externals({ vue: "Vue", "vue-router": "VueRouter", vuex: "Vuex", axios: "axios", "element-ui": "ELEMENT", 'BMap': 'BMap', 'BMap_Symbol_SHAPE_POINT': 'BMap_Symbol_SHAPE_POINT' }); const entry = config.entry("app"); entry.add("babel-polyfill").end(); entry.add("classlist-polyfill").end(); entry.add("@/mock").end(); }, //开发模式反向代理配置,生产模式请使用Nginx部署并配置反向代理 devServer: { port: 8000, proxy: { "/api": { //本地服务接口地址 // target: "http://30.40.58.127", //公司 // target: "http://118.178.121.93:7065", //本地测试 // target: "http://118.178.121.93", //测试环境打包 // target: 'http://192.168.9.159', target: "http://192.168.1.21:81", //膳食正式 // target: "http://121.40.96.63:80", //膳食正式 // target: "http://192.168.3.123:81", //家里 //远程演示服务地址,可用于直接启动项目 // target: "https://saber.bladex.vip/api", ws: true, pathRewrite: { "^/api": "/" } } } } };