index.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // see http://vuejs-templates.github.io/webpack for documentation.
  2. var path = require('path');
  3. module.exports = {
  4. build: {
  5. env: require('./prod.env'),
  6. index: path.resolve(__dirname, '../dist/index.html'),
  7. assetsRoot: path.resolve(__dirname, '../dist'),
  8. assetsSubDirectory: 'static',
  9. assetsPublicPath: './',
  10. productionSourceMap: true,
  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. },
  18. dev: {
  19. env: require('./dev.env'),
  20. port: 8090,
  21. assetsSubDirectory: 'static',
  22. assetsPublicPath: '/',
  23. proxyTable: {
  24. '/uas_manage_client': {
  25. target: 'http://localhost:9090',
  26. changeOrigin: true
  27. },
  28. '/uas_schedular': {
  29. target: 'http://localhost:9001',
  30. changeOrigin: true
  31. },
  32. '/uas_database': {
  33. target: 'http://localhost:9002',
  34. changeOrigin: true
  35. }
  36. },
  37. // CSS Sourcemaps off by default because relative paths are "buggy"
  38. // with this option, according to the CSS-Loader README
  39. // (https://github.com/webpack/css-loader#sourcemaps)
  40. // In our experience, they generally work as expected,
  41. // just be aware of this issue when enabling this option.
  42. cssSourceMap: false
  43. }
  44. }