元气智驾官网前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vue.config.js 679 B

1 year ago
1 year ago
1 year ago
12345678910111213141516171819202122232425262728293031323334
  1. const path = require('path')
  2. function resolve (dir) {
  3. return path.join(__dirname, dir)
  4. }
  5. module.exports = {
  6. configureWebpack: {
  7. resolve: {
  8. alias: {
  9. '@': resolve('src')
  10. }
  11. }
  12. },
  13. chainWebpack: config => {
  14. config.plugin('html')
  15. .tap(args => {
  16. args[0].title = '元汽智驾'
  17. return args
  18. })
  19. },
  20. productionSourceMap: false,
  21. devServer: {
  22. proxy: {
  23. '/api': {
  24. target: 'https://www.meta-autotv.com/homeC', // 后端服务器地址
  25. changeOrigin: true, // 是否改变Origin头信息
  26. pathRewrite: {
  27. '^/api': ''
  28. }
  29. }
  30. }
  31. }
  32. }