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
feat(v3-uplift): build /dev/components on previews, not production
The showcase was gated only by client-side NODE_ENV checks. Since next
build sets NODE_ENV=production, the route existed and was fetchable on
every deployed build — including Vercel previews, where it rendered blank
— while all ~29 showcase modules still shipped in the production bundle.
Unusable where it was wanted, shipped where it wasn't.
Gates it via pageExtensions instead, the same build-time mechanism already
used for the *.governance.tsx pages (PR #379, 'feat: conditional build').
Renaming the pages to *.dev.tsx means Next never sees them unless that
extension is registered: no route, no chunk, a real 404 rather than a blank
page. The now-redundant NODE_ENV guards are removed — they would have kept
the page blank on preview.
VERCEL_ENV is Vercel's documented system variable for per-environment
behaviour, so previews work with no dashboard setup. The
VERCEL_ENV !== 'production' veto is deliberate: without it the gate is
purely additive, and NEXT_PUBLIC_ENABLE_DEV_PAGES=true left scoped to all
environments would leak the showcase into production.
0 commit comments