index.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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://localhost/wycore/api', //物业系统webapi
  13. target:'http://m.gaoyuan.com.cn:8015/api', //物业系统webapi
  14. //target: 'http://222.223.237.11:8189/WorkFlowWebService60NodeJS/query.asmx', //东龙webservice
  15. changeOrigin: true,
  16. pathRewrite: {
  17. '^/api': ''
  18. }
  19. },
  20. '/uploadimg': {
  21. //target:'http://localhost/wycore/uploadimg', //物业系统webapi
  22. target:'http://m.gaoyuan.com.cn:8015/uploadimg', //物业系统webapi
  23. //target: 'http://222.223.237.11:8189/WorkFlowWebService60NodeJS/query.asmx', //东龙webservice
  24. changeOrigin: true,
  25. pathRewrite: {
  26. '^/uploadimg': ''
  27. }
  28. }
  29. },
  30. // Various Dev Server settings
  31. host: 'localhost', // can be overwritten by process.env.HOST
  32. port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
  33. autoOpenBrowser: true,
  34. errorOverlay: true,
  35. notifyOnErrors: true,
  36. poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
  37. // Use Eslint Loader?
  38. // If true, your code will be linted during bundling and
  39. // linting errors and warnings will be shown in the console.
  40. useEslint: false,
  41. // If true, eslint errors and warnings will also be shown in the error overlay
  42. // in the browser.
  43. showEslintErrorsInOverlay: false,
  44. /**
  45. * Source Maps
  46. */
  47. // https://webpack.js.org/configuration/devtool/#development
  48. devtool: 'cheap-module-inline-source-map',
  49. // If you have problems debugging vue-files in devtools,
  50. // set this to false - it *may* help
  51. // https://vue-loader.vuejs.org/en/options.html#cachebusting
  52. cacheBusting: true,
  53. cssSourceMap: true
  54. },
  55. build: {
  56. // Template for index.html
  57. index: path.resolve(__dirname, '../dist/index.html'),
  58. // Paths
  59. assetsRoot: path.resolve(__dirname, '../dist'),
  60. assetsSubDirectory: 'static',
  61. assetsPublicPath: './',
  62. /**
  63. * Source Maps
  64. */
  65. productionSourceMap: true,
  66. // https://webpack.js.org/configuration/devtool/#production
  67. devtool: '#source-map',
  68. // Gzip off by default as many popular static hosts such as
  69. // Surge or Netlify already gzip all static assets for you.
  70. // Before setting to `true`, make sure to:
  71. // npm install --save-dev compression-webpack-plugin
  72. productionGzip: false,
  73. productionGzipExtensions: ['js', 'css'],
  74. // Run the build command with an extra argument to
  75. // View the bundle analyzer report after build finishes:
  76. // `npm run build --report`
  77. // Set to `true` or `false` to always turn it on or off
  78. bundleAnalyzerReport: process.env.npm_config_report
  79. }
  80. }