primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Css gets broken on cloudflare because of minification

Open ertucode opened this issue 5 months ago • 1 comments

Describe the bug

Auto minify feature of cloudflare was breaking css that had the @layer declarations. This is not really an issue on the primeng side, but It's been broken on our testing environment for 6 months and I've only been able to figure out this issue. So, I thought I would post it here to help. Maybe a warning in the docs could be useful as well. You can check if your css is minified by looking at the response headers.

image

Environment

"primeng": "^17.9.0" "primeflex": "^3.3.0",

Reproducer

No response

Angular version

17.2.3

PrimeNG version

17.9.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

22.2.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Run locally everything is fine
  2. Deploy on cloudflare and your site gets broken sometimes
  3. Check response headers to see if they contain Cf-Bgj:minify

Expected behavior

Cloudflare doesn't break the css

ertucode avatar Sep 05 '24 09:09 ertucode