index.js 1.4 KB

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