index.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 = "http://172.18.0.29:30046/";
  6. // const baseUrl = "http://81.70.84.72:30046/"
  7. const baseUrl = "http://172.18.1.233:30046/";
  8. module.exports = {
  9. dev: {
  10. // Paths
  11. assetsSubDirectory: "static",
  12. assetsPublicPath: "/",
  13. proxyTable: {
  14. "/landcrm": {
  15. target: "http://172.18.0.23/",
  16. // target: "http://101.200.225.123",
  17. // target: "http://172.18.1.40:8089/",
  18. changeOrigin: true,
  19. pathRewrite: {
  20. "/landcrm": "/landcrm",
  21. },
  22. },
  23. "/issue": {
  24. target: baseUrl,
  25. // target: "http://81.70.84.72:30046/",
  26. changeOrigin: true,
  27. pathRewrite: {
  28. "/issue": "/issue",
  29. },
  30. },
  31. "/common": {
  32. target: baseUrl,
  33. // target: "http://81.70.84.72:30046/",
  34. changeOrigin: true,
  35. pathRewrite: {
  36. "/common": "/common",
  37. },
  38. },
  39. "/file": {
  40. target: "http://81.70.84.72:30045/",
  41. // target: "http://81.70.84.72:30046/",
  42. changeOrigin: true,
  43. pathRewrite: {
  44. "/file": "/file",
  45. },
  46. },
  47. "/issueStatistics": {
  48. target: baseUrl,
  49. changeOrigin: true,
  50. pathRewrite: {
  51. "/issueStatistics": "issueStatistics",
  52. },
  53. },
  54. "/": {
  55. target: "http://www.jihengcc.cn:17080/",
  56. changeOrigin: true,
  57. pathRewrite: {
  58. "/": "",
  59. },
  60. },
  61. },
  62. // Various Dev Server settings
  63. host: '127.0.0.1', // can be overwritten by process.env.HOST
  64. port: 8088, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  65. autoOpenBrowser: true,
  66. errorOverlay: true,
  67. notifyOnErrors: true,
  68. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  69. // Use Eslint Loader?
  70. // If true, your code will be linted during bundling and
  71. // linting errors and warnings will be shown in the console.
  72. useEslint: false,
  73. // If true, eslint errors and warnings will also be shown in the error overlay
  74. // in the browser.
  75. showEslintErrorsInOverlay: false,
  76. /**
  77. * Source Maps
  78. */
  79. // https://webpack.js.org/configuration/devtool/#development
  80. devtool: "cheap-module-eval-source-map",
  81. // If you have problems debugging vue-files in devtools,
  82. // set this to false - it *may* help
  83. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  84. cacheBusting: true,
  85. cssSourceMap: true,
  86. },
  87. build: {
  88. // Template for index.html
  89. index: path.resolve(__dirname, "../dist/index.html"),
  90. // Paths
  91. assetsRoot: path.resolve(__dirname, "../dist"),
  92. // assetsSubDirectory: 'patrolFront/static',
  93. // assetsPublicPath: '/',
  94. assetsSubDirectory: "static",
  95. assetsPublicPath: "./",
  96. /**
  97. * Source Maps
  98. */
  99. productionSourceMap: false,
  100. // https://webpack.js.org/configuration/devtool/#production
  101. devtool: "#source-map",
  102. // Gzip off by default as many popular static hosts such as
  103. // Surge or Netlify already gzip all static assets for you.
  104. // Before setting to `true`, make sure to:
  105. // npm install --save-dev compression-webpack-plugin
  106. productionGzip: false,
  107. productionGzipExtensions: ["js", "css"],
  108. // Run the build command with an extra argument to
  109. // View the bundle analyzer report after build finishes:
  110. // `npm run build --report`
  111. // Set to `true` or `false` to always turn it on or off
  112. bundleAnalyzerReport: process.env.npm_config_report,
  113. },
  114. };