Force CSS fingerprint regeneration to bust CloudFront cache #16275
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds a comment to
theme/tailwind.config.jsto force CSS regeneration, which busts the CloudFront cache that was serving stale CSS for the reinvent page.Problem
The reinvent page (https://www.pulumi.com/reinvent) was not displaying correctly in production because the CSS class
-translate-y-1/2was missing from the served CSS file.Root cause: The build process fingerprints CSS before PurgeCSS runs, causing CloudFront to cache CSS with a filename that doesn't match the actual content. When the reinvent template was added, PurgeCSS output changed (to include the new class), but the filename hash stayed the same because the source CSS didn't change.
CloudFront was serving a 20+ hour old cached version of
bundle.34a92c....cssthat was generated before the reinvent template existed.Solution
This PR adds a comment and unused class to
tailwind.config.jsto force Webpack to regenerate the CSS with new content. This causes Hugo to compute a new fingerprint hash, resulting in a new filename that CloudFront has never cached.When this deploys:
bundle.<NEW_HASH>.cssLong-Term Fix
This is a temporary workaround. The proper architectural fix is tracked in #16274, which proposes:
Testing
Files Changed
theme/tailwind.config.js- Added cache-bust comment with reference to Fix CSS fingerprinting to happen after PurgeCSS #16274🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com