index.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. var path = require('path')
  2. module.exports = {
  3. build: {
  4. env: require('./prod.env'),
  5. index: path.resolve(__dirname, '../dist/index.html'),
  6. assetsRoot: path.resolve(__dirname, '../dist'),
  7. assetsSubDirectory: 'static',
  8. assetsPublicPath: './',
  9. productionSourceMap: true,
  10. productionGzip: false,
  11. productionGzipExtensions: ['js', 'css'],
  12. bundleAnalyzerReport: process.env.npm_config_report
  13. },
  14. dev: {
  15. env: require('./dev.env'),
  16. port: 8090,
  17. autoOpenBrowser: true,
  18. assetsSubDirectory: 'static',
  19. assetsPublicPath: '/',
  20. proxyTable: {
  21. '/api': {
  22. target: 'http://192.168.101.166:8091', // 接口域名 开发
  23. secure: true, // 如果是https接口,需要配置这个参数
  24. changeOrigin: true, //是否跨域
  25. pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径
  26. '^/api': '/'
  27. }
  28. },
  29. '/ips': {
  30. target: 'http://192.168.101.166:8080', // 接口域名 开发
  31. secure: true, // 如果是https接口,需要配置这个参数
  32. changeOrigin: true, //是否跨域
  33. pathRewrite: { // 如果接口本身没有api的路径,那么这里将发送到后端的请求重写为没有api的路径
  34. '^/ips': '/'
  35. }
  36. },
  37. },
  38. cssSourceMap: false
  39. }
  40. }