index.js 1.5 KB

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