Stop shipping six copies of static/ in every deployment - #180
Conversation
Docusaurus copies static/ into each locale build, so every deployment carried the ~340 MB of utility apps six times (~2.1 GB). With dozens of retained preview and production deployments this put Deployment Storage at 71 GB on a 10 GB Hobby quota. - postbuild: drop the locale copies of static files (build now ~440 MB). - vercel.json: rewrite /<locale>/<static dir>/... to the root copy; rewrites only apply when no file matches, so generated locale pages still win. - vercel.json: skip Vercel deployments for Dependabot branches. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ff321a115
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Why
Vercel Hobby shows Deployment Storage 71 GB / 10 GB. Docusaurus copies
static/into every locale build (build/ru,build/ua, …), so each deployment carried the ~340 MB of utility apps six times: ~2.1 GB per deployment. Every push to any branch (including Dependabot) creates one, and retained deployments add up.What
scripts/dedupe-locale-static.js(runs inpostbuild): deletes the locale copies of static files. Local build: 2.1 GB → 436 MB. It fails the build if a new top-levelstatic/entry is not covered by the rewrite.vercel.jsonrewrite:/<locale>/{utility-apps,mini-games,img,vendor,…}/…→ root copy. Vercel rewrites only apply when no file matches, so generated locale pages (e.g./ru/mini-games/) are still served from the locale build. Headers match on the request path, so they don't change.vercel.json:git.deploymentEnabledoff fordependabot/**branches.Still needs a manual step
This only makes new deployments smaller. Old deployments keep counting until they are removed: set a Deployment Retention Policy in Project Settings, and/or delete old preview deployments.
🤖 Generated with Claude Code