postcss.config.js 549 B

12345678910111213141516171819202122
  1. module.exports = (ctx) => ({
  2. map: false,//ctx.env === 'production' ? ctx.options.map : false,
  3. parser: ctx.options.parser,
  4. plugins: {
  5. 'postcss-import': { root: ctx.file.dirname },
  6. 'postcss-mixins': {},
  7. // 'postcss-simple-vars': {},
  8. 'postcss-nested': {},
  9. 'tailwindcss': {},
  10. 'autoprefixer': {},
  11. 'postcss-preset-env': {},
  12. cssnano: ctx.env !== 'production' ? false : {
  13. preset: [
  14. 'default',
  15. {
  16. discardComments: { removeAll: true },
  17. calc: false
  18. }
  19. ]
  20. },
  21. },
  22. })