vue.config.js 669 B

12345678910111213141516171819202122232425
  1. const { defineConfig } = require('@vue/cli-service')
  2. module.exports = defineConfig({
  3. transpileDependencies: true,
  4. // 添加此行代码
  5. lintOnSave: false,
  6. assetsDir: 'static',
  7. publicPath: "/",
  8. outputDir: 'dist',
  9. productionSourceMap: false,
  10. devServer: {
  11. host: '0.0.0.0',
  12. port: 8001,
  13. proxy: {
  14. [process.env.VUE_APP_BASE_API]: {
  15. // target: 'http://192.168.1.21:8080',//本地代码
  16. target: 'http://1.82.219.241:8080', // 测试
  17. // target: 'http://1.82.219.240:8080', // 生产
  18. changeOrigin: true,
  19. pathRewrite: {
  20. ['^' + process.env.VUE_APP_BASE_API]: ''
  21. }
  22. },
  23. },
  24. },
  25. })