vue.config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. const Timestamp = new Date().getTime();
  2. module.exports = {
  3. lintOnSave: false,
  4. devServer: {
  5. port: 8084, // 端口
  6. proxy: {
  7. '/api': {
  8. target: 'http://192.168.0.3:19095/',
  9. changeOrigin: true,
  10. pathRewrite: {
  11. '^/api': '',
  12. }
  13. },
  14. '/bpi': {
  15. target: 'http://192.168.0.3:19096/',
  16. changeOrigin: true,
  17. pathRewrite: {
  18. '^/bpi': '',
  19. }
  20. },
  21. '/cpi': {
  22. target: 'http://192.168.0.62:9010/',
  23. changeOrigin: true,
  24. pathRewrite: {
  25. '^/cpi': '',
  26. }
  27. }
  28. }
  29. },
  30. configureWebpack: {
  31. output: { // 输出重构 打包编译后的 文件名称 【模块名称.版本号.时间戳】
  32. filename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`,
  33. chunkFilename: `[name].${process.env.VUE_APP_Version}.${Timestamp}.js`
  34. }
  35. },
  36. // 输出文件目录
  37. // outputDir: 'D:/wwwroot/flyLongStaticPc/build',//windows输出目录
  38. outputDir: '/Users/macbook/Working/vueBuild/flyLong/GoAllOutTv',//mac输出目录
  39. productionSourceMap: false,//关闭map文件,减少打包后体积
  40. };