postcss.config.js 1.3 KB

1234567891011121314151617181920212223242526272829
  1. /*
  2. Fix for compiling the angular project's tests, using PnP simulation, which inline FullCalendar's packages' CSS.
  3. The build process has postcss running, which crawls up the dir structure when including @fullcalendar/(daygrid|common)/main.css,
  4. only to find this postcss config file.
  5. */
  6. if (process.env.npm_package_name === 'fullcalendar-angular-workspace') {
  7. module.exports = {}
  8. } else {
  9. module.exports = {
  10. parser: require('postcss-comment'), // for "//" style comments
  11. plugins: [
  12. require('postcss-advanced-variables'),
  13. require('postcss-nesting'),
  14. require('@arshaw/postcss-custom-properties')({ // a fork that does preserveWithFallback
  15. importFrom: './packages/common/src/styles/vars.css', // available to all stylesheets
  16. preserve: true, // keep var statements intact (but still reduce their value in a second statement)
  17. preserveWithFallback: true // the preserved var statements will have a fallback value
  18. }),
  19. require('@arshaw/postcss-calc'), // a fork that ensures important spaces (issue 5503)
  20. require('autoprefixer')
  21. // TODO: remove empty blocks
  22. // apparently it should automatically work with postcss-nesting, but doesn't seem to
  23. // https://github.com/jonathantneal/postcss-nesting/issues/19
  24. ]
  25. }
  26. }