index.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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.110',
  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. secure: false,
  37. changeOrigin: true,
  38. pathRewrite: {
  39. '^/community': '/'
  40. }
  41. },
  42. "/landcrm": { //基础服务
  43. target: "https://pms.hajwy.com/landcrm",
  44. secure: false,
  45. changeOrigin: true,
  46. pathRewrite: {
  47. '^/landcrm': '/'
  48. }
  49. },
  50. "/mkf": { //地区、项目获取
  51. target: 'https://pms.hajwy.com/landcrm',
  52. secure: false,
  53. changeOrigin: true,
  54. pathRewrite: {
  55. '^/mkf': '/'
  56. }
  57. },
  58. "/hajwy": { //采购结算明细对接
  59. target: 'https://pms.hajwy.com/qpi/rest',
  60. secure: false,
  61. changeOrigin: true,
  62. pathRewrite: {
  63. '^/hajwy': '/'
  64. }
  65. },
  66. "/purchase": { //采采购管理整体测试
  67. // target: "http://www.jihengcc.cn:17080/purchase", //采购供应商管理测试
  68. target: "https://pms.hajwy.com/purchase", //采购供应商管理测试
  69. // target: "http://172.18.1.40:8989/purchase",
  70. secure: false,
  71. changeOrigin: true,
  72. pathRewrite: {
  73. '^/purchase': '/'
  74. }
  75. }
  76. },
  77. // CSS Sourcemaps off by default because relative paths are "buggy"
  78. // with this option, according to the CSS-Loader README
  79. // (https://github.com/webpack/css-loader#sourcemaps)
  80. // In our experience, they generally work as expected,
  81. // just be aware of this issue when enabling this option.
  82. cssSourceMap: false
  83. }
  84. }