index.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. 'use strict'
  2. // Template version: 1.1.1
  3. // see http://vuejs-templates.github.io/webpack for documentation.
  4. const path = require('path')
  5. module.exports = {
  6. project: "", //打包需要使用(sass-loader)
  7. build: {
  8. env: require('./prod.env'),
  9. index: path.resolve(__dirname, '../dist/index.html'),
  10. assetsRoot: path.resolve(__dirname, '../dist'),
  11. assetsSubDirectory: 'static',
  12. assetsPublicPath: './',
  13. productionSourceMap: false,
  14. // Gzip off by default as many popular static hosts such as
  15. // Surge or Netlify already gzip all static assets for you.
  16. // Before setting to `true`, make sure to:
  17. // npm install --save-dev compression-webpack-plugin
  18. productionGzip: false,
  19. productionGzipExtensions: ['js', 'css'],
  20. // Run the build command with an extra argument to
  21. // View the bundle analyzer report after build finishes:
  22. // `npm run build --report`
  23. // Set to `true` or `false` to always turn it on or off
  24. bundleAnalyzerReport: process.env.npm_config_report
  25. },
  26. dev: {
  27. env: require('./dev.env'),
  28. host: '172.18.0.116',
  29. port: process.env.PORT || 8085,
  30. autoOpenBrowser: true,
  31. assetsSubDirectory: 'static',
  32. assetsPublicPath: '/',
  33. proxyTable: {
  34. "/community": { //基础服务
  35. target: "https:/pms.hajwy.com/community",
  36. // target: "http://172.18.1.40:8989/community",
  37. secure: false,
  38. changeOrigin: true,
  39. pathRewrite: {
  40. '^/community': '/'
  41. }
  42. },
  43. "/landcrm": { //基础服务
  44. target: "https://pms.hajwy.com/landcrm",
  45. secure: false,
  46. changeOrigin: true,
  47. pathRewrite: {
  48. '^/landcrm': '/'
  49. }
  50. },
  51. "/mkf": { //地区、项目获取
  52. target: 'https://pms.hajwy.com/landcrm',
  53. secure: false,
  54. changeOrigin: true,
  55. pathRewrite: {
  56. '^/mkf': '/'
  57. }
  58. },
  59. "/hajwy": { //采购结算明细对接
  60. target: 'https://pms.hajwy.com/qpi/rest',
  61. secure: false,
  62. changeOrigin: true,
  63. pathRewrite: {
  64. '^/hajwy': '/'
  65. }
  66. },
  67. "/purchase": { //采采购管理整体测试
  68. // target: "http://www.jihengcc.cn:17080/purchase", //采购供应商管理测试
  69. // target: "https://test.hajwy.com/purchase", //采购供应商管理测试
  70. target: "https://pms.hajwy.com/purchase",
  71. // target: "http://172.18.1.40:8989/purchase",
  72. secure: false,
  73. changeOrigin: true,
  74. pathRewrite: {
  75. '^/purchase': '/'
  76. }
  77. }
  78. },
  79. // CSS Sourcemaps off by default because relative paths are "buggy"
  80. // with this option, according to the CSS-Loader README
  81. // (https://github.com/webpack/css-loader#sourcemaps)
  82. // In our experience, they generally work as expected,
  83. // just be aware of this issue when enabling this option.
  84. cssSourceMap: false
  85. }
  86. }