Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Css gets broken on cloudflare because of minification #16348

Closed
ertucode opened this issue Sep 5, 2024 · 2 comments
Closed

Css gets broken on cloudflare because of minification #16348

ertucode opened this issue Sep 5, 2024 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@ertucode
Copy link

ertucode commented Sep 5, 2024

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 ertucode added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 5, 2024
@ertucode
Copy link
Author

ertucode commented Sep 8, 2024

It is possible and we have already disabled it but I just wanted to give a heads up to people who might have the same issue.

@ertucode ertucode closed this as completed Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants