vue.config.js 1013 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. const path = require('path');
  2. const common = path.resolve(__dirname, '../common');
  3. module.exports = {
  4. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  5. outputDir: 'labmobile',
  6. productionSourceMap: false,
  7. configureWebpack: (config) => {
  8. Object.assign(config, {
  9. resolve: {
  10. alias: {
  11. '@': path.resolve(__dirname, './src'),
  12. '@c': path.resolve(__dirname, './src/components'),
  13. '@a': path.resolve(__dirname, './src/assets'),
  14. '@common': common,
  15. },
  16. },
  17. });
  18. },
  19. devServer: {
  20. port: '8001',
  21. proxy: {
  22. '/files': {
  23. target: 'http://broadcast.waityou24.cn',
  24. },
  25. '/freeLabel/api': {
  26. target: 'http://broadcast.waityou24.cn',
  27. },
  28. // [process.env.VUE_APP_BASE_API]: {
  29. // target: 'http://broadcast.kqyjy.com',
  30. // changeOrigin: true,
  31. // ws: false,
  32. // // pathRewrite: {
  33. // // ['^' + process.env.VUE_APP_BASE_API]: '',
  34. // // },
  35. // },
  36. },
  37. },
  38. };