vue.config.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. const path = require('path');
  2. const frame = path.resolve(__dirname, '../frame');
  3. const center = path.resolve(__dirname, '../train-center');
  4. module.exports = {
  5. publicPath: process.env.NODE_ENV === 'development' ? '/' : '/teacher',
  6. outputDir: 'teacher',
  7. configureWebpack: {
  8. // externals: {
  9. // 'element-ui': 'Element',
  10. // vue: 'Vue',
  11. // },
  12. // 开发生产共同配置
  13. resolve: {
  14. alias: {
  15. '@': path.resolve(__dirname, './src'),
  16. '@c': path.resolve(__dirname, './src/components'),
  17. '@a': path.resolve(__dirname, './src/assets'),
  18. '@frame': frame,
  19. '@center': center,
  20. },
  21. },
  22. },
  23. devServer: {
  24. port: '8003',
  25. //api地址前缀
  26. proxy: {
  27. '/api/auth': {
  28. target: 'http://jytz.jilinjobs.cn', ///api/train http://free.liaoningdoupo.com http://jytz.jilinjobs.cn
  29. changeOrigin: true,
  30. ws: true,
  31. },
  32. '/api': {
  33. target: 'http://jytz.jilinjobs.cn',
  34. changeOrigin: true,
  35. ws: true,
  36. },
  37. '/files': {
  38. target: 'http://jytz.jilinjobs.cn',
  39. changeOrigin: true,
  40. ws: true,
  41. },
  42. '/ws': {
  43. target: 'http://jytz.jilinjobs.cn',
  44. ws: true,
  45. },
  46. '/weixin': {
  47. target: 'http://smart.cc-lotus.info',
  48. changeOrigin: true,
  49. ws: true,
  50. },
  51. },
  52. },
  53. };