Skip to content

hide mock controls in non-dev build - #130

Merged
noahm merged 3 commits into
mantine-uifrom
claude/mock-controls-dev-preview-SFe3O
Mar 15, 2026
Merged

hide mock controls in non-dev build#130
noahm merged 3 commits into
mantine-uifrom
claude/mock-controls-dev-preview-SFe3O

Conversation

@noahm

@noahm noahm commented Mar 15, 2026

Copy link
Copy Markdown
Owner

No description provided.

Show MockStageControls only for local dev (import.meta.env.DEV) or
Vercel preview deployments (VERCEL_ENV === "preview"). Production
builds return null from GlobalControls.

https://claude.ai/code/session_01S9thP5ugqKU5NhPNDWFmYh
@vercel

vercel Bot commented Mar 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
smx-config-web Ready Ready Preview Mar 15, 2026 2:46pm

@noahm noahm changed the title add ant ui package hide mock controls in non-dev build Mar 15, 2026
@noahm
noahm changed the base branch from main to mantine-ui March 15, 2026 14:38
Moves MockStageControls into its own module (mock-controls.tsx) and
loads it via a conditional lazy() import. Vite statically replaces
import.meta.env.DEV with false at build time, so Rollup's DCE drops
the dynamic import branch entirely — the mock chunk and sdk/mock.ts
are never emitted in production builds.

https://claude.ai/code/session_01S9thP5ugqKU5NhPNDWFmYh
Rename unused `n` params to `_n` in sdk/mock.ts and reformat
ternary in global-controls.tsx to satisfy biome's line-length rules.

https://claude.ai/code/session_01S9thP5ugqKU5NhPNDWFmYh
@noahm
noahm merged commit 1720436 into mantine-ui Mar 15, 2026
5 checks passed
@noahm
noahm deleted the claude/mock-controls-dev-preview-SFe3O branch March 15, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants