vue.config.js 1.8 KB

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