Skip to content

CSS not being compressed #422

Closed
Closed
@adamhl8

Description

@adamhl8

I'm not able to compress the CSS generated by astro.

Error: Cannot compress file //dist/_astro/_slug_.CPIc14WV.css
Error: Cannot compress file //dist/_astro/_slug_.Dvd5riTk.css

In #376 it's mentioned that if a file doesn't need compression an error is thrown, but I don't think that's what's happening in my case.

I manually installed lightningcss and ran it on one of the files and it went from 52KB to 48KB, so it can definitely be compressed.

I thought it might be something with csso specifically, so I tried setting the parser to just lightningcss, but I still get the same error.

playformCompress({ Parser: { CSS: "lightningcss" } }),

If you'd like to reproduce, it's on the branch compress on my repo: https://github.com/adamhl8/adamhl.dev

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions