index.js 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. '/api': {
  12. // target: 'http://192.168.200.21:8080', //源地址
  13. target: 'http://localhost:8080', //源地址
  14. //target: 'https://dd.meetingfuture.top', //源地址
  15. changeOrigin: true, //是否跨域
  16. // pathRewrite: {
  17. // '^/api': '' //路径重写
  18. // }
  19. },
  20. '/a1': {
  21. //target: 'http://192.168.200.21:8081', //源地址
  22. target: 'http://localhost:8081', //源地址
  23. //target: 'https://a1.meetingfuture.top', //源地址
  24. changeOrigin: true, //是否跨域
  25. },
  26. '/a2': {
  27. target: 'http://localhost:8081', //源地址
  28. //target: 'https://a2.meetingfuture.top', //源地址
  29. changeOrigin: true, //是否跨域
  30. // pathRewrite: {
  31. // '^/api': '' //路径重写
  32. // }
  33. }
  34. },
  35. // Various Dev Server settings
  36. host: '0.0.0.0', // can be overwritten by process.env.HOST
  37. port: 80, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  38. autoOpenBrowser: false,
  39. errorOverlay: true,
  40. notifyOnErrors: true,
  41. poll: true, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  42. /**
  43. * Source Maps
  44. */
  45. // https://webpack.js.org/configuration/devtool/#development
  46. devtool: 'cheap-module-eval-source-map',
  47. // If you have problems debugging vue-files in devtools,
  48. // set this to false - it *may* help
  49. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  50. cacheBusting: true,
  51. cssSourceMap: false
  52. },
  53. build: {
  54. // Template for index.html
  55. index: path.resolve(__dirname, '../dist/index.html'),
  56. // Paths
  57. assetsRoot: path.resolve(__dirname, '../dist'),
  58. assetsSubDirectory: 'static',
  59. assetsPublicPath: '/',
  60. /**
  61. * Source Maps
  62. */
  63. productionSourceMap: false,
  64. // https://webpack.js.org/configuration/devtool/#production
  65. devtool: '#source-map',
  66. // Gzip off by default as many popular static hosts such as
  67. // Surge or Netlify already gzip all static assets for you.
  68. // Before setting to `true`, make sure to:
  69. // npm install --save-dev compression-webpack-plugin
  70. productionGzip: false,
  71. productionGzipExtensions: ['js', 'css'],
  72. // Run the build command with an extra argument to
  73. // View the bundle analyzer report after build finishes:
  74. // `npm run build --report`
  75. // Set to `true` or `false` to always turn it on or off
  76. bundleAnalyzerReport: process.env.npm_config_report
  77. }
  78. }