index.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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://invoice.back.jkcredit.com/",
  13. // target: "http://192.168.1.184:18081/",
  14. target: "http://hub.invoice.jkcredit.com/",
  15. changeOrigin: true,
  16. pathRewrite: {
  17. '^/api': ''
  18. },
  19. "secure": false,
  20. }
  21. },
  22. // Various Dev Server settings
  23. // host: "0.0.0.0", // can be overwritten by process.env.HOST
  24. port: 8088, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  25. autoOpenBrowser: false,
  26. errorOverlay: true,
  27. notifyOnErrors: true,
  28. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  29. // Use Eslint Loader?
  30. // If true, your code will be linted during bundling and
  31. // linting errors and warnings will be shown in the console.
  32. useEslint: true,
  33. // If true, eslint errors and warnings will also be shown in the error overlay
  34. // in the browser.
  35. showEslintErrorsInOverlay: false,
  36. /**
  37. * Source Maps
  38. */
  39. // https://webpack.js.org/configuration/devtool/#development
  40. devtool: 'cheap-module-eval-source-map',
  41. // If you have problems debugging vue-files in devtools,
  42. // set this to false - it *may* help
  43. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  44. cacheBusting: true,
  45. cssSourceMap: true
  46. },
  47. build: {
  48. // Template for index.html
  49. index: path.resolve(__dirname, '../dist/index.html'),
  50. // Paths
  51. assetsRoot: path.resolve(__dirname, '../dist'),
  52. assetsSubDirectory: 'static',
  53. assetsPublicPath: '/',
  54. /**
  55. * Source Maps
  56. */
  57. productionSourceMap: true,
  58. // https://webpack.js.org/configuration/devtool/#production
  59. devtool: '#source-map',
  60. // Gzip off by default as many popular static hosts such as
  61. // Surge or Netlify already gzip all static assets for you.
  62. // Before setting to `true`, make sure to:
  63. // npm install --save-dev compression-webpack-plugin
  64. productionGzip: false,
  65. productionGzipExtensions: ['js', 'css'],
  66. // Run the build command with an extra argument to
  67. // View the bundle analyzer report after build finishes:
  68. // `npm run build --report`
  69. // Set to `true` or `false` to always turn it on or off
  70. bundleAnalyzerReport: process.env.npm_config_report
  71. }
  72. }
  73. // 'use strict'
  74. // // Template version: 1.3.1
  75. // // see http://vuejs-templates.github.io/webpack for documentation.
  76. // const path = require('path')
  77. // module.exports = {
  78. // dev: {
  79. // // Paths
  80. // assetsSubDirectory: 'static',
  81. // assetsPublicPath: '/',
  82. // proxyTable: {},
  83. // // Various Dev Server settings
  84. // host: 'localhost', // can be overwritten by process.env.HOST
  85. // port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  86. // autoOpenBrowser: false,
  87. // errorOverlay: true,
  88. // notifyOnErrors: true,
  89. // poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  90. // // Use Eslint Loader?
  91. // // If true, your code will be linted during bundling and
  92. // // linting errors and warnings will be shown in the console.
  93. // useEslint: true,
  94. // // If true, eslint errors and warnings will also be shown in the error overlay
  95. // // in the browser.
  96. // showEslintErrorsInOverlay: false,
  97. // /**
  98. // * Source Maps
  99. // */
  100. // // https://webpack.js.org/configuration/devtool/#development
  101. // devtool: 'cheap-module-eval-source-map',
  102. // // If you have problems debugging vue-files in devtools,
  103. // // set this to false - it *may* help
  104. // // https://vue-loader.vuejs.org/en/options.html#cachebusting
  105. // cacheBusting: true,
  106. // cssSourceMap: true
  107. // },
  108. // build: {
  109. // // Template for index.html
  110. // index: path.resolve(__dirname, '../dist/index.html'),
  111. // // Paths
  112. // assetsRoot: path.resolve(__dirname, '../dist'),
  113. // assetsSubDirectory: 'static',
  114. // assetsPublicPath: '/',
  115. // /**
  116. // * Source Maps
  117. // */
  118. // productionSourceMap: true,
  119. // // https://webpack.js.org/configuration/devtool/#production
  120. // devtool: '#source-map',
  121. // // Gzip off by default as many popular static hosts such as
  122. // // Surge or Netlify already gzip all static assets for you.
  123. // // Before setting to `true`, make sure to:
  124. // // npm install --save-dev compression-webpack-plugin
  125. // productionGzip: false,
  126. // productionGzipExtensions: ['js', 'css'],
  127. // // Run the build command with an extra argument to
  128. // // View the bundle analyzer report after build finishes:
  129. // // `npm run build --report`
  130. // // Set to `true` or `false` to always turn it on or off
  131. // bundleAnalyzerReport: process.env.npm_config_report
  132. // }
  133. // }