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.

122 lines
3.5 KiB

5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 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/xm': {
  12. target: 'http://localhost:7067',
  13. changeOrigin: true,
  14. pathRewrite: {
  15. '^/api/m1/xm': '/xm'
  16. }
  17. },
  18. // '/api/m1/sys': {
  19. // target: 'http://localhost:7015',
  20. // changeOrigin: true,
  21. // pathRewrite: {
  22. // '^/api/m1/sys': '/sys'
  23. // }
  24. // },
  25. // '/api/m1/pay': {
  26. // target: 'http://localhost:7125',
  27. // changeOrigin: true,
  28. // pathRewrite: {
  29. // '^/api/m1/pay': '/pay'
  30. // }
  31. // },
  32. /**
  33. '/api/m1/workflow': {
  34. target: 'http://localhost:7080',
  35. changeOrigin: true,
  36. pathRewrite: {
  37. '^/api/m1/workflow': '/workflow'
  38. }
  39. },
  40. **/
  41. '/api': {
  42. target: 'https://www.qingqinkj.com',
  43. changeOrigin: true,
  44. pathRewrite: {
  45. '^/api': '/api'
  46. }
  47. }
  48. },
  49. // Various Dev Server settings
  50. host: 'localhost', // can be overwritten by process.env.HOST
  51. port: 8067, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  52. autoOpenBrowser: true,
  53. errorOverlay: true,
  54. notifyOnErrors: false,
  55. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  56. // Use Eslint Loader?
  57. // If true, your code will be linted during bundling and
  58. // linting errors and warnings will be shown in the console.
  59. useEslint: false,
  60. // If true, eslint errors and warnings will also be shown in the error overlay
  61. // in the browser.
  62. showEslintErrorsInOverlay: false,
  63. /**
  64. * Source Maps
  65. */
  66. // https://webpack.js.org/configuration/devtool/#development
  67. devtool: 'eval',
  68. // If you have problems debugging vue-files in devtools,
  69. // set this to false - it *may* help
  70. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  71. cacheBusting: true,
  72. // CSS Sourcemaps off by default because relative paths are "buggy"
  73. // with this option, according to the CSS-Loader README
  74. // (https://github.com/webpack/css-loader#sourcemaps)
  75. // In our experience, they generally work as expected,
  76. // just be aware of this issue when enabling this option.
  77. cssSourceMap: false,
  78. },
  79. build: {
  80. // Template for index.html
  81. index: path.resolve(__dirname, '../dist/index.html'),
  82. // Paths
  83. assetsRoot: path.resolve(__dirname, '../dist'),
  84. assetsSubDirectory: '',
  85. // you can set by youself according to actual condition
  86. assetsPublicPath: './',
  87. /**
  88. * Source Maps
  89. */
  90. productionSourceMap: false,
  91. // https://webpack.js.org/configuration/devtool/#production
  92. devtool: false,
  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. }