index.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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://47.108.151.62:80/pre', //后端接口地址 中间人运营平台
  12. target: 'http://127.0.0.1:28080', //后端接口地址
  13. // target: 'http://192.168.3.8:7001', //后端接口地址
  14. changeOrigin: true, //是否跨域
  15. pathRewrite: {
  16. '^/': '/', //重写,
  17. }
  18. }
  19. },
  20. // 本地开发使用 192.168.0.126 localhost
  21. host: '127.0.0.1',
  22. // host: '192.168.124.14',
  23. port: 8081,
  24. autoOpenBrowser: true,
  25. errorOverlay: true,
  26. notifyOnErrors: false,
  27. poll: false,
  28. useEslint: true,
  29. showEslintErrorsInOverlay: false,
  30. devtool: 'cheap-source-map',
  31. cssSourceMap: false
  32. },
  33. build: {
  34. index: path.resolve(__dirname, '../dist/index.html'),
  35. assetsRoot: path.resolve(__dirname, '../dist'),
  36. assetsSubDirectory: 'static',
  37. assetsPublicPath: '/bid/',
  38. productionSourceMap: false,
  39. devtool: 'source-map',
  40. productionGzip: false,
  41. productionGzipExtensions: ['js', 'css'],
  42. bundleAnalyzerReport: process.env.npm_config_report || false,
  43. generateAnalyzerReport: process.env.npm_config_generate_report || false
  44. }
  45. }