vue.config.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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. proxy: {
  20. '/api': {
  21. // target: 'http://192.168.0.162:9000/',
  22. target: 'http://192.168.0.110:8080',
  23. // target: 'http://192.168.0.243:9000/',
  24. changeOrigin: true,
  25. pathRewrite: {
  26. '^/api': '',
  27. }
  28. }
  29. }
  30. },
  31. // 输出文件目录
  32. outputDir: 'D:/wwwroot/flyLongStaticTv/build',
  33. publicPath:'./',
  34. };