vue.config.js 771 B

123456789101112131415161718192021222324252627282930
  1. const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
  2. const { defineConfig } = require('@vue/cli-service')
  3. const { sassTrue } = require('sass')
  4. module.exports = defineConfig({
  5. configureWebpack: {
  6. plugins: [new NodePolyfillPlugin()],
  7. },
  8. devServer: {
  9. port: 8081, // 端口
  10. open: false, // 启动后打开浏览器
  11. client: {
  12. overlay: false
  13. },
  14. /*本地开发请求代理*/
  15. proxy: {
  16. '/dev-api': {
  17. // target: "http://47.92.229.224:8080",
  18. // target: "http://10.87.21.103:8080",
  19. // target: "http://10.87.21.107:8080",
  20. target: "http://10.87.23.51:8080",
  21. // ws:true,
  22. changOrigin:true,
  23. pathRewrite:{
  24. '^/dev-api':'/'
  25. }
  26. },
  27. }
  28. },
  29. })