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.

107 lines
3.2 KiB

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