postcss.conf.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. exports.postfactory = function (opts) {
  2. // console.log(111111);
  3. return [
  4. //css中引入内联样式表
  5. // require('postcss-easy-import')(),
  6. //css混合宏的使用
  7. require('postcss-mixins')(),
  8. //css的for循环插件 必须在postcss-simple-vars之前运行
  9. require('postcss-for')(),
  10. require('postcss-each')(),
  11. //类似于sass语法的css变量定义
  12. require('postcss-simple-vars')(),
  13. //sass扩展语法
  14. require('postcss-sass-extend')(),
  15. //css媒体查询简写 https://github.com/postcss/postcss-media-minmax/blob/master/README-zh.md
  16. require('postcss-media-minmax')(),
  17. //css层级写法 https://github.com/postcss/postcss-nested
  18. require('postcss-nested')(),
  19. //css选择器简写
  20. require('postcss-selector-matches')(),
  21. require('postcss-selector-not')(),
  22. //css缩写与简写 crip的缩写列表 https://github.com/johnie/crip-css-properties
  23. require('postcss-alias')(),
  24. require('postcss-crip')(),
  25. //css浏览器兼容
  26. require('autoprefixer')({ browsers: ['last 2 versions'] }),
  27. //css计算
  28. require("postcss-calc")
  29. ];
  30. }