Repository navigation
Minor Changes
-
Rewrite the purge pipeline for correctness and speed.
- Stylesheets, binaries, virtual modules and
?queryids are no longer passed to PurgeCSS as content. Extracting tokens out of a stylesheet marked every selector it declared as "used", which silently disabled purging for that file. - Page imports are now read from disk and passed as
RawContent(with a shared cache) instead of handing PurgeCSS bare file paths. - The import-graph walk is iterative and visit-tracked, replacing the recursive traversal that could re-visit modules and recurse without bound on cyclic graphs.
- Pages are purged concurrently (up to
cpus().length), and a failure on one page is logged instead of aborting the build. - Renamed stylesheets are replaced with
replaceAll, so the preload and view-transition copies of the same href are rewritten too. - Purged output names are derived from the content hash, so pages that purge down to identical CSS converge on one file. An existing 8-character hash is only stripped when the name actually has one.
- Original stylesheets are removed only once nothing in the build still references them, instead of truncating every emitted CSS file to an empty string.
- The
cssoption is documented as integration-managed and now warns when passed.
The on-disk JSON cache (
getCacheFile/writeCacheFile/getFilesHash) has been removed along with itscreateCodegenDir()codegen directory; purging now runs from scratch on every build.globandpathemoved fromdevDependenciestodependencies, and thevitedev dependency was bumped to^6.0.3to match the version Astro 5 ships. - Stylesheets, binaries, virtual modules and