index.js 1.1 KB

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