index.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. 'use strict'
  2. // Template version: 1.3.1
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4. const path = require('path')
  5. const baseUrl = "https://192.168.31.174:29001"
  6. module.exports = {
  7. dev: {
  8. // Paths
  9. assetsSubDirectory: 'static',
  10. assetsPublicPath: '/',
  11. proxyTable: {
  12. '/debug': {
  13. target: baseUrl,
  14. changeOrigin: true,
  15. secure: false,
  16. pathRewrite: {
  17. '^/debug': ''
  18. },headers: {
  19. Referer: baseUrl
  20. }
  21. },
  22. '/zlmServer': {
  23. target: "https://szgpay.ticp.net:29010",
  24. changeOrigin: true,
  25. secure: false,
  26. pathRewrite: {
  27. '^/zlmServer': ''
  28. },headers: {
  29. Referer: baseUrl
  30. }
  31. },
  32. '/aiLib':{
  33. target: baseUrl,
  34. secure: false,
  35. changeOrigin: true,
  36. },
  37. '/mFile':{
  38. target: baseUrl,
  39. secure: false,
  40. changeOrigin: true,
  41. },
  42. '/static/snap': {
  43. target: baseUrl,
  44. secure: false,
  45. changeOrigin: true,
  46. // pathRewrite: {
  47. // '^/static/snap': '/static/snap'
  48. // }
  49. },
  50. },
  51. devServer: {
  52. https: true,
  53. },
  54. // Various Dev Server settings
  55. host:"0.0.0.0",
  56. useLocalIp: false, // can be overwritten by process.env.HOST
  57. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  58. autoOpenBrowser: false,
  59. errorOverlay: true,
  60. notifyOnErrors: true,
  61. hot: true,//自动保存
  62. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  63. /**
  64. * Source Maps
  65. */
  66. // https://webpack.js.org/configuration/devtool/#development
  67. devtool: 'cheap-module-eval-source-map',
  68. // If you have problems debugging vue-files in devtools,
  69. // set this to false - it *may* help
  70. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  71. cacheBusting: true,
  72. cssSourceMap: true
  73. },
  74. build: {
  75. // Template for index.html
  76. index: path.resolve(__dirname, '../../src/main/resources/static/index.html'),
  77. user: path.resolve(__dirname, '../../src/main/resources/static/index.html'),
  78. // Paths
  79. assetsRoot: path.resolve(__dirname, '../../src/main/resources/static/'),
  80. assetsSubDirectory: './static',
  81. assetsPublicPath: '/',
  82. /**
  83. * Source Maps
  84. */
  85. productionSourceMap: true,
  86. // https://webpack.js.org/configuration/devtool/#production
  87. devtool: '#source-map',
  88. // Gzip off by default as many popular static hosts such as
  89. // Surge or Netlify already gzip all static assets for you.
  90. // Before setting to `true`, make sure to:
  91. // npm install --save-dev compression-webpack-plugin
  92. productionGzip: false,
  93. productionGzipExtensions: ['js', 'css'],
  94. // Run the build command with an extra argument to
  95. // View the bundle analyzer report after build finishes:
  96. // `npm run build --report`
  97. // Set to `true` or `false` to always turn it on or off
  98. bundleAnalyzerReport: process.env.npm_config_report
  99. }
  100. }