vue.config.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROUTER,
  4. // 打包文件
  5. outputDir: 'adminsys',
  6. configureWebpack: config => {
  7. Object.assign(config, {
  8. // 开发生产共同配置
  9. resolve: {
  10. alias: {
  11. '@': path.resolve(__dirname, './src'),
  12. '@c': path.resolve(__dirname, './src/components'),
  13. '@a': path.resolve(__dirname, './src/assets'),
  14. },
  15. },
  16. });
  17. },
  18. devServer: {
  19. port: '8001',
  20. //api地址前缀
  21. proxy: {
  22. '/weixin': {
  23. target: 'http://smart.cc-lotus.info',
  24. changeOrigin: true,
  25. ws: true,
  26. },
  27. '/files': {
  28. target: 'http://free.liaoningdoupo.com',
  29. },
  30. '/api': {
  31. target: 'http://free.liaoningdoupo.com',
  32. changeOrigin: true,
  33. ws: true,
  34. },
  35. '/api/setting': {
  36. target: 'http://free.liaoningdoupo.com',
  37. changeOrigin: true,
  38. ws: true,
  39. },
  40. '/api/affairs': {
  41. target: 'http://free.liaoningdoupo.com',
  42. changeOrigin: true,
  43. ws: true,
  44. },
  45. '/api/policy': {
  46. target: 'http://free.liaoningdoupo.com',
  47. changeOrigin: true,
  48. ws: true,
  49. },
  50. '/api/record': {
  51. target: 'http://free.liaoningdoupo.com',
  52. changeOrigin: true,
  53. ws: true,
  54. },
  55. '/api/serve': {
  56. target: 'http://free.liaoningdoupo.com',
  57. changeOrigin: true,
  58. ws: true,
  59. },
  60. '/api/talent': {
  61. target: 'http://free.liaoningdoupo.com',
  62. changeOrigin: true,
  63. ws: true,
  64. },
  65. },
  66. },
  67. };