Closed bennycode closed 4 months ago
I updated to @playform/compress v0.0.4 and it seems to work:
Compress: ✅ Successfully compressed a total of 1 CSS file for 429 Bytes. 23:49:34 [build] Waiting for integration "@playform/compress", hook "astro:build:done"... ✅ Successfully compressed a total of 294 HTML files for 304.97 KB. ✅ Successfully compressed a total of 1 JavaScript file for 5 Bytes. ✅ Successfully compressed a total of 1 SVG file for 4.91 KB.
Thank you for the fix! 🙏
For future reference the issue was that sharp
was being imported at the main level of the module Integration.ts instead of where the code is executed. sharp
is now imported with:
await import('sharp')
only when it's needed. Glad it works. 🎉
I have been trying to use
@playform/compress
v0.0.3 in combination withastro
v4.6.3. I often ran into issues when trying to load my Astro site. The build process stopped with the following message:After I removed
@playform/compress
from myastro.config.ts
everything was fine.This was my config:
Could my problems come from conflicting versions of
sharp
? Astro uses sharp@0.32.6 but @playform/compress wants sharp@0.33.3.