index.js 3.3 KB

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