vue.config.js 869 B

1234567891011121314151617181920212223242526272829303132333435
  1. const path = require('path');
  2. module.exports = {
  3. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  4. // 打包文件
  5. outputDir: `${process.env.VUE_APP_ROUTER}`,
  6. productionSourceMap: false,
  7. configureWebpack: (config) => {
  8. Object.assign(config, {
  9. // 开发生产共同配置
  10. resolve: {
  11. extensions: ['.js', '.json', '.vue'],
  12. alias: {
  13. '@': path.resolve(__dirname, './src'),
  14. '@c': path.resolve(__dirname, './src/components'),
  15. '@a': path.resolve(__dirname, './src/assets'),
  16. },
  17. },
  18. });
  19. },
  20. devServer: {
  21. port: '9900',
  22. //api地址前缀
  23. proxy: {
  24. '/files': {
  25. target: 'http://broadcast.waityou24.cn',
  26. },
  27. '/api': {
  28. target: 'http://www.waityou24.cn', //http://192.168.1.19:9101
  29. changeOrigin: true,
  30. ws: false,
  31. },
  32. },
  33. },
  34. };