Git Product home page Git Product logo

Comments (8)

NikolaRHristov avatar NikolaRHristov commented on June 26, 2024 1

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.

NikolaRHristov avatar NikolaRHristov commented on June 26, 2024

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.

JuliusBairaktaris avatar JuliusBairaktaris commented on June 26, 2024

Thanks!

from compress.

wolf-yuan-6115 avatar wolf-yuan-6115 commented on June 26, 2024

Disabling csso also fixed this issue in my case

compress({
  CSS: { lightningcss: {}, csso: null },
}),

from compress.

NikolaRHristov avatar NikolaRHristov commented on June 26, 2024

Should be fixed the latest astro-compress v2.2.28 and @playform/compress v0.0.13

from compress.

JuliusBairaktaris avatar JuliusBairaktaris commented on June 26, 2024

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.

NikolaRHristov avatar NikolaRHristov commented on June 26, 2024

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.

JuliusBairaktaris avatar JuliusBairaktaris commented on June 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.