index.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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.61:8081',//后端接口地址
  11. // target: 'http://192.168.2.114:8081',//后端接口地址
  12. // target: 'http://127.0.0.1:8081',//后端接口地址
  13. changeOrigin: true, //是否跨域
  14. pathRewrite: {
  15. '^/pre': '/',//重写,
  16. }
  17. }
  18. },
  19. // 本地开发使用
  20. host: '192.168.2.14',
  21. port: 9527,
  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. }