vue.config.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. // '/websocket': {
  23. // target: 'ws://192.168.0.22:8080/',
  24. // // target: 'http://82.157.123.54:9010',
  25. // ws: true,
  26. // changeOrigin: true,
  27. // // pathRewrite: {
  28. // // '^/websocket': '/',
  29. // // }
  30. // },
  31. '/api': {
  32. target: 'http://221.214.111.254:9000/',//小飞龙的
  33. // target: 'http://192.168.0.162:9000/',//PC的
  34. // target: 'http://192.168.0.110:8080',//公司公用的
  35. // target: 'http://192.168.0.196:8080',//树莓派
  36. // target: 'http://192.168.0.74:8080',//郑伟机器的2
  37. // target: 'http://192.168.0.243:9000/',//刘海生机器的
  38. // target: ' http://192.168.0.222:9000/',//redmi的
  39. changeOrigin: true,
  40. pathRewrite: {
  41. '^/api': '',
  42. }
  43. },
  44. // 查询最新wgt版本
  45. '/bpi': {
  46. target: 'http://192.168.0.3:19096',//公司公用的
  47. changeOrigin: true,
  48. pathRewrite: {
  49. '^/bpi': '',
  50. }
  51. }
  52. }
  53. },
  54. // 输出文件目录
  55. outputDir: 'D:/Work/SportFitness/TV2/build',
  56. publicPath: './',
  57. productionSourceMap: false,
  58. };