vue/cli3配置

element-ui

vue-antd

 

 

vue-axios

import axios from "axios";

Vue.prototype.$axios = axios;

// vue.config.js 配置說明
//官方vue.config.js 參考文檔 https://cli.vuejs.org/zh/config/#css-loaderoptions
module.exports = {
    devServer: {
      host: "localhost",
      port: 8080, // 端口號
      https: false, // https:{type:Boolean}
      open: true, //配置自動啓動瀏覽器
      // proxy: 'http://localhost:4000' // 配置跨域處理,只有一個代理
      // 配置多個代理
      proxy: {
        "/api": {
          target: "https://www.baidu.com",
          ws: true,
          changeOrigin: true,
          pathRewrite:{
              "^/api":''
          }
        },
      }
    }
  };

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章