Rust library to generate static websites
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: revert Tailwind fix

+5 -5
+5
.sampo/changesets/steadfast-guardian-ilmatar.md
··· 1 + --- 2 + maudit: patch 3 + --- 4 + 5 + Revert Tailwind hashing change, need a different solution. In the meantime, it is possible for stale content to appear with Tailwind in select conditions.
-5
crates/maudit/src/assets.rs
··· 346 346 } 347 347 HashAssetType::Style(opts) => { 348 348 buf.push(opts.tailwind as u8); 349 - 350 - if opts.tailwind { 351 - // If Tailwind is enabled for that style, we can't calculate the hash purely from the file content, as the final output will depend on the Tailwind configuration and the content of the entire project. So we'll add a random thing to the hash to ensure always a new hash. The way to fix this would be to calculate the hash based on the final output CSS after Tailwind processing, but that'd require holding a lot of pages in memory, transforming after we're done with bundling all assets, etc. Which: Does not feel good. Until a better solution, the hash changing on each build when Tailwind is involved will have to do. 352 - buf.extend_from_slice(&Instant::now().elapsed().as_nanos().to_le_bytes()); 353 - } 354 349 } 355 350 HashAssetType::Script => { /* No extra options for scripts yet */ } 356 351 }