You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
3.7 KiB

5 years ago
2 years ago
5 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
5 years ago
2 years ago
5 years ago
2 years ago
5 years ago
2 years ago
5 years ago
2 years ago
5 years ago
2 years ago
5 years ago
  1. 'use strict'
  2. // Template version: 1.2.6
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4. const path = require('path')
  5. module.exports = {
  6. dev: {
  7. // Paths
  8. assetsSubDirectory: '',
  9. assetsPublicPath: '/',
  10. proxyTable: {
  11. '/api/m1/lcode': {
  12. target: 'http://localhost:7014',
  13. changeOrigin: true,
  14. pathRewrite: {
  15. '^/api/m1/lcode': '/lcode'
  16. }
  17. },
  18. /**
  19. '/api/m1/xm': {
  20. target: 'http://localhost:7067',
  21. changeOrigin: true,
  22. pathRewrite: {
  23. '^/api/m1/xm': '/xm'
  24. }
  25. },
  26. **/
  27. /**
  28. '/api/m1/sys': {
  29. target: 'http://localhost:7015',
  30. changeOrigin: true,
  31. pathRewrite: {
  32. '^/api/m1/sys': '/sys'
  33. }
  34. },
  35. **/
  36. // '/api/m1/pay': {
  37. // target: 'http://localhost:7125',
  38. // changeOrigin: true,
  39. // pathRewrite: {
  40. // '^/api/m1/pay': '/pay'
  41. // }
  42. // },
  43. /**
  44. '/api/m1/form': {
  45. target: 'http://localhost:7080',
  46. changeOrigin: true,
  47. pathRewrite: {
  48. '^/api/m1/form': '/form'
  49. }
  50. },
  51. **/
  52. '/api': {
  53. target: 'https://www.qingqinkj.com',
  54. changeOrigin: true,
  55. pathRewrite: {
  56. '^/api': '/api'
  57. }
  58. }
  59. },
  60. // Various Dev Server settings
  61. host: 'localhost', // can be overwritten by process.env.HOST
  62. port: 8015, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  63. autoOpenBrowser: true,
  64. errorOverlay: true,
  65. notifyOnErrors: false,
  66. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  67. // Use Eslint Loader?
  68. // If true, your code will be linted during bundling and
  69. // linting errors and warnings will be shown in the console.
  70. useEslint: false,
  71. // If true, eslint errors and warnings will also be shown in the error overlay
  72. // in the browser.
  73. showEslintErrorsInOverlay: false,
  74. /**
  75. * Source Maps
  76. */
  77. // https://webpack.js.org/configuration/devtool/#development
  78. devtool: 'eval',
  79. // If you have problems debugging vue-files in devtools,
  80. // set this to false - it *may* help
  81. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  82. cacheBusting: true,
  83. // CSS Sourcemaps off by default because relative paths are "buggy"
  84. // with this option, according to the CSS-Loader README
  85. // (https://github.com/webpack/css-loader#sourcemaps)
  86. // In our experience, they generally work as expected,
  87. // just be aware of this issue when enabling this option.
  88. cssSourceMap: false,
  89. },
  90. build: {
  91. // Template for index.html
  92. index: path.resolve(__dirname, '../dist/index.html'),
  93. // Paths
  94. assetsRoot: path.resolve(__dirname, '../dist'),
  95. assetsSubDirectory: '',
  96. // you can set by youself according to actual condition
  97. assetsPublicPath: './',
  98. /**
  99. * Source Maps
  100. */
  101. productionSourceMap: false,
  102. // https://webpack.js.org/configuration/devtool/#production
  103. devtool: false,
  104. // Gzip off by default as many popular static hosts such as
  105. // Surge or Netlify already gzip all static assets for you.
  106. // Before setting to `true`, make sure to:
  107. // npm install --save-dev compression-webpack-plugin
  108. productionGzip: false,
  109. productionGzipExtensions: ['js', 'css'],
  110. // Run the build command with an extra argument to
  111. // View the bundle analyzer report after build finishes:
  112. // `npm run build --report`
  113. // Set to `true` or `false` to always turn it on or off
  114. bundleAnalyzerReport: process.env.npm_config_report
  115. }
  116. }