index.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. const devEnv = require('./dev.env')
  6. const testUrl = devEnv.URL.replace(/"/g,'');
  7. module.exports = {
  8. build: {
  9. env: require('./prod.env'),
  10. index: path.resolve(__dirname, '../dist/index.html'),
  11. assetsRoot: path.resolve(__dirname, '../dist'),
  12. assetsSubDirectory: 'static',
  13. assetsPublicPath: './',
  14. productionSourceMap: false,
  15. // Gzip off by default as many popular static hosts such as
  16. // Surge or Netlify already gzip all static assets for you.
  17. // Before setting to `true`, make sure to:
  18. // npm install --save-dev compression-webpack-plugin
  19. productionGzip: false,
  20. productionGzipExtensions: ['js', 'css'],
  21. // Run the build command with an extra argument to
  22. // View the bundle analyzer report after build finishes:
  23. // `npm run build --report`
  24. // Set to `true` or `false` to always turn it on or off
  25. bundleAnalyzerReport: process.env.npm_config_report
  26. },
  27. dev: {
  28. env: require('./dev.env'),
  29. port: process.env.PORT || 8060,
  30. autoOpenBrowser: true,
  31. assetsSubDirectory: 'static',
  32. assetsPublicPath: '/',
  33. proxyTable: {
  34. "/landcrm": {
  35. target: testUrl + '/landcrm',
  36. secure: false,
  37. changeOrigin: true,
  38. pathRewrite: {
  39. '^/landcrm': '/'
  40. }
  41. },
  42. "/datashow": {
  43. target: testUrl + '/datashow',
  44. secure: false,
  45. changeOrigin: true,
  46. pathRewrite: {
  47. '^/datashow': '/'
  48. }
  49. },
  50. "/neikong": {
  51. target: testUrl + '/neikong', //宋都测试
  52. secure: false,
  53. changeOrigin: true,
  54. pathRewrite: {
  55. '^/neikong': '/'
  56. }
  57. }
  58. },
  59. // CSS Sourcemaps off by default because relative paths are "buggy"
  60. // with this option, according to the CSS-Loader README
  61. // (https://github.com/webpack/css-loader#sourcemaps)
  62. // In our experience, they generally work as expected,
  63. // just be aware of this issue when enabling this option.
  64. cssSourceMap: false
  65. }
  66. }