/* * @Author: your name * @Date: 2021-09-15 15:26:08 * @LastEditTime: 2022-01-04 21:49:44 * @LastEditors: Lone * @Description: In User Settings Edit * @FilePath: \pro-email\vue.config.js */ //vue 官方关于vue.config.js中配置的详细文档: https://cli.vuejs.org/zh/config/#vue-config-js module.exports = { publicPath: process.env.NODE_ENV === 'production' // ? '/crm-project/' ? '/crm/' : '/', devServer: { overlay: { warnings: false, errors: false }, // open: false, //是否自动弹出浏览器页面 // host: "localhost", // port: '8080', // https: false, //是否使用https协议 // hotOnly: true, //是否开启热更新 proxy: {//配置跨域 '/lineapi': { target: 'https://www.mysales.com.tw/',//填写真实的后台接口 ws: false, changOrigin: true,//允许跨域 pathRewrite: { '^/lineapi': ''//请求的时候使用这个api就可以 } }, '/api': { target: 'https://www.mysales.com.tw/',//填写真实的后台接口 ws: false, changOrigin: true,//允许跨域 pathRewrite: { '^/api': '/api'//请求的时候使用这个api就可以 } }, // '/login': { // target: 'http://52.74.188.171:9200/',//填写真实的后台接口 // // ws: true, // // secure: true, // changOrigin: true,//允许跨域 // pathRewrite: { // '^/login': ''//请求的时候使用这个api就可以 // } // }, // '/api': { // target: 'http://54.251.224.117:9220/',//填写真实的后台接口 // // ws: true, // secure: true, // changOrigin: true,//允许跨域 // pathRewrite: { // '^/api': ''//请求的时候使用这个api就可以 // } // }, } }, lintOnSave: false,//是否开启selint css: { extract: false }, configureWebpack:{ watch:true, watchOptions: { poll: 1000, }, } }