index.js 2.7 KB

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