index.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. var path = require('path')
  2. // var ip = '127.0.0.1'
  3. // var ip = '192.168.2.20'// var ip = '192.168.2.12'// var ip = '47.100.37.243'
  4. }
  5. module.exports = {
  6. build: {
  7. env: require('./prod.env'),
  8. index: path.resolve(__dirname, '../dist/index.html'),
  9. assetsRoot: path.resolve(__dirname, '../dist'),
  10. assetsSubDirectory: 'static',
  11. assetsPublicPath: './',
  12. productionSourceMap: false,
  13. productionGzip: false,
  14. productionGzipExtensions: ['js', 'css'],
  15. bundleAnalyzerReport: process.env.npm_config_report
  16. },
  17. dev: {
  18. env: require('./dev.env'),
  19. port: 10086,
  20. autoOpenBrowser: true,
  21. assetsSubDirectory: 'static',
  22. assetsPublicPath: '/',
  23. proxyTable: {
  24. // '/api/permission': {
  25. // target: 'http://' + ip + ':2022',
  26. // pathRewrite: {'^api': '/'}
  27. // },
  28. // '/api/user': {
  29. // target: 'http://' + ip + ':10010',
  30. // pathRewrite: {'^api': '/'}
  31. // }
  32. // '/api/permission': {
  33. // target: 'http://'+ ip +':2022',
  34. // secure: true,
  35. // changeOrigin: true,
  36. // pathRewrite: {
  37. // '^/api': '/'
  38. // }
  39. // },
  40. '/api': {
  41. target: 'http://'+ ip +':10010',
  42. secure: true,
  43. changeOrigin: true,
  44. pathRewrite: {
  45. '^/api': '/'
  46. }
  47. },
  48. // '/ips': {
  49. // target: 'http://'+ ip +':8080',
  50. // secure: true,
  51. // changeOrigin: true,
  52. // pathRewrite: {
  53. // '^/ips': '/'
  54. // }
  55. // },
  56. },
  57. cssSourceMap: false
  58. }
  59. }