You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
netlify deploy --build --prod runs with dev context #5875
On current main, the build step itself already runs with production (@netlify/build defaults to CONTEXT || 'production'). What's still broken is the CLI's own config resolution: deploy --prod resolves netlify.toml with the dev context. As a result:
#11372 makes --prod and --prod-if-unlocked default to production. An explicit --context or CONTEXT still wins. It includes unit tests for the precedence and a mock-API integration test that fails on main.
Activity
lotarbo commentedon Jul 18, 2023
RealDoc06 commentedon Nov 20, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of RealDoc06
Fix is up in #11372.
On current main, the build step itself already runs with
production(@netlify/builddefaults toCONTEXT || 'production'). What's still broken is the CLI's own config resolution:deploy --prodresolvesnetlify.tomlwith thedevcontext. As a result:deploy --no-build --prodignores[context.production]overrides (publish dir, functions, headers, redirects).dev.#11372 makes
--prodand--prod-if-unlockeddefault toproduction. An explicit--contextorCONTEXTstill wins. It includes unit tests for the precedence and a mock-API integration test that fails on main.