vue.config.js 700 B

1234567891011121314151617
  1. module.exports = {
  2. publicPath: './', // 这个值被设置为空字符串 ('') 或是相对路径 ('./'),这样所有的资源都会被链接为相对路径,这样打出来的包可以被部署在任意路径。
  3. devServer: {
  4. disableHostCheck: true
  5. // proxy: {
  6. // '^/': { //这里最好有一个 /
  7. // target: 'http://115.238.57.190:8010', // 服务器端接口地址
  8. // ws: true, //如果要代理 websockets,配置这个参数
  9. // // 如果是https接口,需要配置这个参数
  10. // changeOrigin: true, //是否跨域
  11. // pathRewrite: {
  12. // '^/api': ''
  13. // }
  14. // }
  15. // }
  16. }
  17. }