index.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.1.26: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. '/debug/zlmServer': {
  33. target: "https://szgpay.ticp.net:29010",
  34. changeOrigin: true,
  35. secure: false,
  36. pathRewrite: {
  37. '^/debug/zlmServer': ''
  38. },headers: {
  39. Referer: baseUrl
  40. }
  41. },
  42. '/aiLib':{
  43. target: baseUrl,
  44. secure: false,
  45. changeOrigin: true,
  46. },
  47. '/mFile':{
  48. target: baseUrl,
  49. secure: false,
  50. changeOrigin: true,
  51. },
  52. '/static/snap': {
  53. target: baseUrl,
  54. secure: false,
  55. changeOrigin: true,
  56. // pathRewrite: {
  57. // '^/static/snap': '/static/snap'
  58. // }
  59. },
  60. },
  61. devServer: {
  62. https: true,
  63. },
  64. // Various Dev Server settings
  65. host:"0.0.0.0",
  66. useLocalIp: false, // can be overwritten by process.env.HOST
  67. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  68. autoOpenBrowser: false,
  69. errorOverlay: true,
  70. notifyOnErrors: true,
  71. hot: true,//自动保存
  72. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  73. /**
  74. * Source Maps
  75. */
  76. // https://webpack.js.org/configuration/devtool/#development
  77. devtool: 'cheap-module-eval-source-map',
  78. // If you have problems debugging vue-files in devtools,
  79. // set this to false - it *may* help
  80. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  81. cacheBusting: true,
  82. cssSourceMap: true
  83. },
  84. build: {
  85. // Template for index.html
  86. index: path.resolve(__dirname, '../../src/main/resources/static/index.html'),
  87. user: path.resolve(__dirname, '../../src/main/resources/static/index.html'),
  88. // Paths
  89. assetsRoot: path.resolve(__dirname, '../../src/main/resources/static/'),
  90. assetsSubDirectory: './static',
  91. assetsPublicPath: '/',
  92. /**
  93. * Source Maps
  94. */
  95. productionSourceMap: true,
  96. // https://webpack.js.org/configuration/devtool/#production
  97. devtool: '#source-map',
  98. // Gzip off by default as many popular static hosts such as
  99. // Surge or Netlify already gzip all static assets for you.
  100. // Before setting to `true`, make sure to:
  101. // npm install --save-dev compression-webpack-plugin
  102. productionGzip: false,
  103. productionGzipExtensions: ['js', 'css'],
  104. // Run the build command with an extra argument to
  105. // View the bundle analyzer report after build finishes:
  106. // `npm run build --report`
  107. // Set to `true` or `false` to always turn it on or off
  108. bundleAnalyzerReport: process.env.npm_config_report
  109. }
  110. }