vue.config.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. const pxRem = require("postcss-pxtorem");
  2. module.exports = {
  3. // rem
  4. css:{
  5. loaderOptions:{
  6. postcss: {
  7. //selectorBlackList正则过滤,符合的class不进行rem转化
  8. //单个的css语句需过滤的情况下,可以使用PX或Px单位
  9. plugins:[pxRem({
  10. autoprefixer:{},
  11. rootValue: 75,
  12. propList: ["*"],// 需要做转化处理的属性,如`hight`、`width`、`margin`等,`*`表示全部 默认全部处理
  13. selectorBlackList:[".ig-",".dp-"]
  14. })]
  15. }
  16. }
  17. },
  18. lintOnSave: false,
  19. devServer: {
  20. port: 202, // 端口
  21. proxy: {
  22. '/api': {
  23. // target: 'http://192.168.0.105:8080/',//小飞龙的
  24. // target: 'http://192.168.0.162:9000/',//PC的
  25. // target: 'http://192.168.0.110:8080',//公司公用的
  26. // target: 'http://192.168.0.196:8080',//树莓派
  27. target: 'http://192.168.0.74:8080',//郑伟机器的2
  28. // target: 'http://192.168.0.243:9000/',//刘海生机器的
  29. // target: ' http://192.168.0.222:9000/',//redmi的
  30. changeOrigin: true,
  31. pathRewrite: {
  32. '^/api': '',
  33. }
  34. },
  35. // 用查询最新wgt 般本
  36. '/bpi': {
  37. target: 'http://192.168.0.3:19096',//公司公用的
  38. changeOrigin: true,
  39. pathRewrite: {
  40. '^/bpi': '',
  41. }
  42. }
  43. }
  44. },
  45. // 输出文件目录
  46. outputDir: 'D:\\wwwroot\\flyLong\\hbuild\\GoAllOutTv\\build',
  47. publicPath: './',
  48. productionSourceMap: false,
  49. };