vue.config.js 550 B

1234567891011121314151617181920212223242526
  1. const path = require("path");
  2. module.exports = {
  3. publicPath: "./",
  4. devServer: {
  5. host: "0.0.0.0",
  6. port: "",
  7. proxy: {
  8. "/api": {
  9. target: "http://linyi.natapp1.cc", // 目标 API 地址 富勇电脑
  10. // target: "http://ue.360lj.com", // 线上地址
  11. ws: true,
  12. changeOrigin: true, // 将主机标头的原点更改为目标URL
  13. pathRewrite: {
  14. "^/api": "/api"
  15. }
  16. }
  17. },
  18. overlay: {
  19. warnings: false,
  20. errors: false,
  21. lintOnSave: false
  22. }
  23. }
  24. };