We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
lightningcss
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.
csso
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
compress
The text was updated successfully, but these errors were encountered:
Running into this same issue in my environment
Sorry, something went wrong.
We found the error.
We're setting unusedSymbols to false in
unusedSymbols
false
Compress/Source/Variable/CSS/lightningcss.ts
Line 10 in c807585
Error: invalid type: boolean `false`, expected a sequence
As a hotfix I would recommend setting unusedSymbols to []:
[]
import type { defineConfig } from "astro/config"; export default (await import("astro/config")).defineConfig({ integrations: [ (await import("@playform/compress")).default({ CSS: { lightningcss: { unusedSymbols: [], }, }, }), ], }) as typeof defineConfig;
Fixed in the latest @playform/[email protected] and [email protected]
NikolaRHristov
No branches or pull requests
I'm not able to compress the CSS generated by astro.
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 justlightningcss
, but I still get the same error.If you'd like to reproduce, it's on the branch
compress
on my repo: https://github.com/adamhl8/adamhl.devThe text was updated successfully, but these errors were encountered: