index.js 2.9 KB

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