index.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 'use strict'
  2. const path = require('path')
  3. module.exports = {
  4. //http://192.168.0.105:8081/
  5. //http://app.bluefire.top:8088 线上地址
  6. dev: {
  7. assetsSubDirectory: 'static',
  8. assetsPublicPath: '/',
  9. proxyTable: {
  10. '/': {
  11. target: 'http://127.0.0.1:7001', //后端接口地址 中间人运营平台
  12. // target: 'http://192.168.2.61:9000', //后端接口地址
  13. changeOrigin: true, //是否跨域
  14. pathRewrite: {
  15. '^/': '/', //重写,
  16. }
  17. }
  18. },
  19. // 本地开发使用 192.168.0.126 localhost
  20. host: '192.168.124.14',
  21. port: 8080,
  22. autoOpenBrowser: true,
  23. errorOverlay: true,
  24. notifyOnErrors: false,
  25. poll: false,
  26. useEslint: true,
  27. showEslintErrorsInOverlay: false,
  28. devtool: 'cheap-source-map',
  29. cssSourceMap: false
  30. },
  31. build: {
  32. index: path.resolve(__dirname, '../dist/index.html'),
  33. assetsRoot: path.resolve(__dirname, '../dist'),
  34. assetsSubDirectory: 'static',
  35. assetsPublicPath: '/',
  36. productionSourceMap: false,
  37. devtool: 'source-map',
  38. productionGzip: false,
  39. productionGzipExtensions: ['js', 'css'],
  40. bundleAnalyzerReport: process.env.npm_config_report || false,
  41. generateAnalyzerReport: process.env.npm_config_generate_report || false
  42. }
  43. }