PlayForm / Compress

🗜️ Compress —

Home Page:https://NPMJS.Org/@playform/compress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Media Queries are deleted

zokkis opened this issue ¡ comments

All of my media queries are deleted after adding astro-compress

Hi, can you provide a minimum viable reproduction, maybe on Stackblitz or CodeSandbox?

I dont know why, but I cant reproduce it with a new install.
But I can reproduce it on my project, even tho I run npm i and npm ci and disabled all the other integrations, but on my project is still the error

{
	"@astrojs/check": "^0.3.4",
	"@astrojs/mdx": "^2.0.3",
	"astro": "^4.0.7",
	"astro-compress": "astro-community/AstroCompress#no-sharp",
	"astro-purgecss": "^4.0.0",
	"node-html-parser": "^6.1.12",
	"purgecss": "^5.0.0",
	"sass": "^1.69.5",
	"sharp": "^0.33.1",
	"typescript": "^5.3.3"
}

astro-integrations (as I said, I tried to disable and still same problem)

[
	purgecss({ variables: true }),
	compress({ Image: false }),
	mdx()
]

tsconfig

{
	"extends": "astro/tsconfigs/strictest",
	"compilerOptions": {
		"baseUrl": ".",
		"paths": {
			"@/*": ["./*"],
			"@public/*": ["./public/*"],
			"@src/*": ["./src/*"],
			"@components/*": ["./src/components/*"],
			"@i18n/*": ["./src/i18n/*"],
			"@layouts/*": ["./src/layouts/*"],
			"@pages/*": ["./src/pages/*"],
			"@shared/*": ["./src/shared/*"],
			"@styles/*": ["./src/styles/*"]
		}
	}
}

astro-purgecss could be removing some of your CSS, have you tried running without it?

disabled all the other integrations, but on my project is still the error

So, yes I tried without any other integrations and I reinstalled Ubuntu and same problem

Should be fixed in the latest astro-compress v2.2.23 and @playform/compress v0.0.4