index.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. 'use strict'
  2. const path = require('path')
  3. module.exports = {
  4. dev: {
  5. assetsSubDirectory: 'static',
  6. assetsPublicPath: '/',
  7. proxyTable: {
  8. '/api': {
  9. //target: 'http://192.168.2.92:8081',//long后端接口地址192.168.2.82
  10. target: 'http://admin.test.uqchat.cn',//测试后端接口地址
  11. //target: 'http://admin.uqchat.cn',//生产后端接口地址
  12. changeOrigin: true, //是否跨域
  13. pathRewrite: {
  14. '^/api': '/',//重写,
  15. }
  16. }
  17. },
  18. // 本地开发使用
  19. host: 'localhost',
  20. port: 9527,
  21. autoOpenBrowser: true,
  22. errorOverlay: true,
  23. notifyOnErrors: false,
  24. poll: false,
  25. useEslint: true,
  26. showEslintErrorsInOverlay: false,
  27. devtool: 'cheap-source-map',
  28. cssSourceMap: false
  29. },
  30. build: {
  31. index: path.resolve(__dirname, '../dist/index.html'),
  32. assetsRoot: path.resolve(__dirname, '../dist'),
  33. assetsSubDirectory: 'static',
  34. assetsPublicPath: './',
  35. productionSourceMap: false,
  36. devtool: 'source-map',
  37. productionGzip: false,
  38. productionGzipExtensions: ['js', 'css'],
  39. bundleAnalyzerReport: process.env.npm_config_report || false,
  40. generateAnalyzerReport: process.env.npm_config_generate_report || false
  41. }
  42. }