vue.config.js 666 B

123456789101112131415161718192021222324252627282930
  1. 'use strict'
  2. const path = require('path')
  3. const port = process.env.port || process.env.npm_config_port || 9527 // dev port
  4. module.exports = {
  5. publicPath: '/map',
  6. outputDir: 'dist',
  7. indexPath: process.env.NODE_ENV === 'development' ? 'mer.html' : 'index.html',
  8. lintOnSave: false,
  9. productionSourceMap: false,
  10. devServer: {
  11. port: port,
  12. // open: true,
  13. overlay: {
  14. warnings: false,
  15. errors: true
  16. },
  17. // proxy: 'http://rcm.frp.liuniu946.com'
  18. proxy: {
  19. '/api': {
  20. target: `http://rcm.frp.liuniu946.com`, // 需要代理到的地址
  21. changeOrigin: true,
  22. // ws: true,
  23. pathRewrite: {
  24. '^/api': '/api'
  25. }
  26. }
  27. }
  28. }
  29. }