vue.config.js 540 B

1234567891011121314151617181920212223
  1. module.exports = {
  2. devServer: {
  3. host: '0.0.0.0',
  4. port: 8081,
  5. open: true,
  6. proxy: {
  7. [process.env.VUE_APP_API_HOST]: {
  8. // target: `http://192.168.0.78:8080`,
  9. target: `http://192.168.0.193:8080`,
  10. changeOrigin: true,
  11. pathRewrite: {
  12. ['^' + process.env.VUE_APP_API_HOST]: ''
  13. }
  14. }
  15. },
  16. // 移除 disableHostCheck 选项
  17. // 如果需要允许所有主机访问,可以使用 allowedHosts: 'all'
  18. allowedHosts: 'all'
  19. },
  20. transpileDependencies: true,
  21. }