index.js 3.6 KB

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