index.js 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // see http://vuejs-templates.github.io/webpack for documentation.
  2. var path = require('path')
  3. module.exports = {
  4. build: {
  5. prodEnv: require('./prod.env'),
  6. index: path.resolve(__dirname, '../kjjg/index.html'),
  7. assetsRoot: path.resolve(__dirname, '../kjjg'),
  8. assetsSubDirectory: 'static',
  9. assetsPublicPath: './', //请根据自己路径配置更改
  10. productionSourceMap: false,
  11. // Gzip off by default as many popular static hosts such as
  12. // Surge or Netlify already gzip all static assets for you.
  13. // Before setting to `true`, make sure to:
  14. // npm install --save-dev compression-webpack-plugin
  15. productionGzip: false,
  16. productionGzipExtensions: ['js', 'css'],
  17. // Run the build command with an extra argument to
  18. // View the bundle analyzer report after build finishes:
  19. // `npm run build --report`
  20. // Set to `true` or `false` to always turn it on or off
  21. bundleAnalyzerReport: process.env.npm_config_report
  22. },
  23. dev: {
  24. // host: '192.168.1.107', // can be overwritten by process.env.HOST
  25. host: 'localhost',
  26. env: require('./dev.env'),
  27. port: 9527,
  28. autoOpenBrowser: true,
  29. assetsSubDirectory: 'static',
  30. assetsPublicPath: '/',
  31. proxyTable: {
  32. '/api': {
  33. // target:'http://10.100.1.135:8081',
  34. // target: 'http://111.56.38.145:9090',//内蒙
  35. // target: 'http://111.164.113.172:9090',//天津
  36. target: 'http://172.16.0.72:8888',
  37. // target: 'http://10.153.42.138:8888',//李调全
  38. // target: 'http://10.223.3.39:9090/api/kjjg',
  39. // target: 'http://10.153.42.133:8888',//刘
  40. secure: false, // 如果是https接口,需要配置这个参数
  41. changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
  42. pathRewrite: {
  43. '^/api': ''
  44. },
  45. },
  46. '/kjdepot': {
  47. // target:'http://10.100.1.135:8081',
  48. // target: 'http://111.56.38.145:9090',//内蒙
  49. // target: 'http://111.164.113.172:9090',//天津
  50. target: 'http://172.16.0.73:8889',
  51. // target: 'http://localhost:8889',
  52. // target: 'http://10.223.3.39:9090/api/kjjg',
  53. secure: false, // 如果是https接口,需要配置这个参数
  54. changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
  55. pathRewrite: {
  56. '^/kjdepot': ''
  57. },
  58. },
  59. '/cbl': {
  60. // target:'http://10.100.1.135:8081',
  61. // target: 'http://111.56.38.145:9090',//内蒙
  62. // target: 'http://111.164.113.172:9090',//天津
  63. target: 'http://101.36.160.140:8097',
  64. secure: false, // 如果是https接口,需要配置这个参数
  65. changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
  66. pathRewrite: {
  67. '^/cbl': ''
  68. },
  69. },
  70. },
  71. // CSS Sourcemaps off by default because relative paths are "buggy"
  72. // with this option, according to the CSS-Loader README
  73. // (https://github.com/webpack/css-loader#sourcemaps)
  74. // In our experience, they generally work as expected,
  75. // just be aware of this issue when enabling this option.
  76. cssSourceMap: false
  77. }
  78. };