Skip to content

perf(vercel): Skip gzip pre-compression and cache hashed assets in deploy previews#112108

Merged
scttcper merged 1 commit into
masterfrom
scttcper/perf/vercel-preview-build
Apr 2, 2026
Merged

perf(vercel): Skip gzip pre-compression and cache hashed assets in deploy previews#112108
scttcper merged 1 commit into
masterfrom
scttcper/perf/vercel-preview-build

Conversation

@scttcper
Copy link
Copy Markdown
Member

@scttcper scttcper commented Apr 2, 2026

Skip CompressionPlugin for Vercel deploy previews. The .gz files are generated for nginx's gzip_static module which Vercel doesn't use — it compresses responses at the edge instead.

Also adds Cache-Control: public, max-age=31536000, immutable headers for content-hashed assets (chunks/ and assets/ directories) served from deploy previews.

saves maybe 10 seconds on build

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 2, 2026
…ploy previews

Skip CompressionPlugin for Vercel deploy previews. The .gz files are
generated for nginx's gzip_static module which Vercel doesn't use —
it compresses at the edge instead.

Also add immutable cache headers for content-hashed assets (chunks/
and assets/ directories) served from deploy previews.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@scttcper scttcper force-pushed the scttcper/perf/vercel-preview-build branch from a5290fb to 5025448 Compare April 2, 2026 15:50
@scttcper scttcper changed the title perf(vercel): Speed up deploy preview builds perf(vercel): Skip gzip pre-compression and cache hashed assets in deploy previews Apr 2, 2026
@scttcper scttcper requested a review from a team April 2, 2026 16:14
@scttcper scttcper marked this pull request as ready for review April 2, 2026 16:14
@scttcper scttcper requested a review from a team as a code owner April 2, 2026 16:14
@scttcper scttcper merged commit d4baa33 into master Apr 2, 2026
71 of 72 checks passed
@scttcper scttcper deleted the scttcper/perf/vercel-preview-build branch April 2, 2026 16:49
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants