Comments (8)
We found the culprit. You can hotfix with:
compress({
CSS: {
lightningcss: {
// Tends to remove all sorts of stuff
unusedSymbols: false,
},
},
HTML: {
"html-minifier-terser": {
removeAttributeQuotes: false,
},
},
Image: false,
JavaScript: true,
SVG: false,
Logger: 1,
})
from compress.
Yeah it seems to stem from the lightningcss
implementation. Check https://8f4b423f.astrowind-436.pages.dev/ - without and https://c50f14f6.astrowind-436.pages.dev/ - with from https://github.com/NikolaRHristov/astrowind. I'll see what I can do, maybe tweak the settings.
from compress.
Thanks!
from compress.
Disabling csso
also fixed this issue in my case
compress({
CSS: { lightningcss: {}, csso: null },
}),
from compress.
Should be fixed the latest astro-compress
v2.2.28 and @playform/compress
v0.0.13
from compress.
While the error is fixed there is no css compression happening now by default. In my opinion that is a suboptimal behavior when compared to v0.0.10 which has css compression enabled by default without breakage.
from compress.
I'm trying it out on https://github.com/NikolaRHristov/astrowind and it works. Can you provide a more detailed example ? https://be6ce6bd.astrowind-436.pages.dev/_astro/click-through.BDl4lSLp.css
from compress.
Here is the build output with v0.0.13. CSS files don't get compressed by default. With v0.0.10 they did
generating optimized images
12:42:30 ▶ /_astro/default.CczmzLWf_1sAySv.webp (reused cache entry) (+1ms) (1/28)
12:42:30 ▶ /_astro/google-play.ISTMcpLO_1zDR0X.webp (reused cache entry) (+1ms) (2/28)
12:42:30 ▶ /_astro/google-play.ISTMcpLO_Z1olcvC.webp (reused cache entry) (+1ms) (3/28)
12:42:30 ▶ /_astro/app-store.t3tG4Jz3_Z1KV8yc.webp (reused cache entry) (+1ms) (4/28)
12:42:30 ▶ /_astro/app-store.t3tG4Jz3_kfUI9.webp (reused cache entry) (+1ms) (5/28)
12:42:30 ▶ /_astro/visa-6850402_1280_ZiyeTK.webp (reused cache entry) (+1ms) (6/28)
12:42:30 ▶ /_astro/visa-6850402_1280_NF36B.webp (reused cache entry) (+1ms) (7/28)
12:42:30 ▶ /_astro/paypal-784404_1280_ZLrFyN.webp (reused cache entry) (+1ms) (8/28)
12:42:30 ▶ /_astro/paypal-784404_1280_Z1SFXAa.webp (reused cache entry) (+1ms) (9/28)
12:42:30 ▶ /_astro/google-1015751_1280_2bEYBC.webp (reused cache entry) (+1ms) (10/28)
12:42:30 ▶ /_astro/google-1015751_1280_14qGAg.webp (reused cache entry) (+1ms) (11/28)
12:42:30 ▶ /_astro/yahoo-76684_1280_1nQcSH.webp (reused cache entry) (+1ms) (12/28)
12:42:30 ▶ /_astro/yahoo-76684_1280_gBTRl.webp (reused cache entry) (+1ms) (13/28)
12:42:30 ▶ /_astro/node-js-736399_1280_2ETvk.webp (reused cache entry) (+1ms) (14/28)
12:42:30 ▶ /_astro/node-js-736399_1280_19TcwG.webp (reused cache entry) (+1ms) (15/28)
12:42:30 ▶ /_astro/ebay-189064_1280_e6bYD.webp (reused cache entry) (+1ms) (16/28)
12:42:30 ▶ /_astro/ebay-189064_1280_1lku10.webp (reused cache entry) (+1ms) (17/28)
12:42:30 ▶ /_astro/microsoft-80658_1280_Z1qQYXE.webp (reused cache entry) (+1ms) (18/28)
12:42:30 ▶ /_astro/microsoft-80658_1280_2w5PNU.webp (reused cache entry) (+1ms) (19/28)
12:42:30 ▶ /_astro/icon-720944_1280_Z10IYzd.webp (reused cache entry) (+1ms) (20/28)
12:42:30 ▶ /_astro/icon-720944_1280_Z27XhAz.webp (reused cache entry) (+1ms) (21/28)
12:42:30 ▶ /_astro/meta-6850393_1280_1MGVyM.webp (reused cache entry) (+1ms) (22/28)
12:42:30 ▶ /_astro/meta-6850393_1280_FsDxq.webp (reused cache entry) (+1ms) (23/28)
12:42:30 ▶ /_astro/hero-image.DwIC_L_T_1uUzOH.webp (reused cache entry) (+1ms) (24/28)
12:42:30 ▶ /_astro/hero-image.DwIC_L_T_Zd27nD.webp (reused cache entry) (+1ms) (25/28)
12:42:30 ▶ /_astro/hero-image.DwIC_L_T_Z4Abv2.webp (reused cache entry) (+1ms) (26/28)
12:42:30 ▶ /_astro/hero-image.DwIC_L_T_239168.webp (reused cache entry) (+1ms) (27/28)
12:42:30 ▶ /_astro/hero-image.DwIC_L_T_23FyCD.webp (reused cache entry) (+1ms) (28/28)
12:42:30 ✓ Completed in 279ms.
12:42:30 [@astrojs/sitemap] `sitemap-index.xml` created at `dist`
Compress:
✅ Successfully compressed a total of 37 HTML files for 112.41 KB.
✅ Successfully compressed a total of 1 JavaScript file for 1 Bytes.
12:42:33 [astrowind] Updating `robots.txt` with `sitemap-index.xml` ...
12:42:33 [build] 36 page(s) built in 9.72s
12:42:33 [build] Complete!
PS E:\astrowind>
from compress.
Related Issues (20)
- free(): invalid size HOT 4
- free(): invalid size HOT 34
- Dynamic import will not move module into another chunk HOT 6
- SVG content is empty since 2.2.18 HOT 5
- Cloudflare crashes HOT 1
- Breaks SolidJS HOT 1
- Actual package name HOT 6
- Adapt to `astro`'s `sharp` version either on `preinstall` or `postinstall` HOT 7
- Broken types HOT 1
- Allow for complete overriding of `sharp`'s options. HOT 1
- unmet peer dependencies HOT 2
- [feature request] optional PurgeCSS integration as part of CSS compression HOT 3
- Javascript Files Getting Skipped HOT 3
- munmap_chunk(): invalid pointer HOT 3
- After upgrading to v0.0.4: Type 'AstroIntegration' is not assignable to type AstroIntegration HOT 16
- html comments not removed HOT 7
- Playform Compress installation fails with Astro 4.9.2 HOT 2
- Media Queries: Range Syntax conflict HOT 3
- CSSO silently removes nested CSS HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compress.