vue.config.js 578 B

1234567891011121314151617181920212223
  1. const { defineConfig } = require('@vue/cli-service')
  2. const proxytarget = process.env.VUE_PROXY_TARGET || 'http://localhost:8080'
  3. module.exports = defineConfig({
  4. transpileDependencies: true,
  5. devServer: {
  6. host: '0.0.0.0',
  7. port: 80,
  8. open: true,
  9. client: {
  10. overlay: false
  11. },
  12. proxy: {
  13. // detail: https://cli.vuejs.org/config/#devserver-proxy
  14. [process.env.VUE_APP_BASE_API]: {
  15. target: proxytarget,
  16. changeOrigin: true,
  17. pathRewrite: {
  18. ['^' + process.env.VUE_APP_BASE_API]: ''
  19. }
  20. }
  21. }
  22. }
  23. })