Commit 623f948
fix(studio): guard import.meta.env for non-Vite consumers
manualEditingAvailability.ts unconditionally reads `import.meta.env`.
That's a Vite-only extension; in plain ESM hosts (Next.js / Turbopack,
Node, jest in some configs) `import.meta` exists but `import.meta.env`
is `undefined`. Reading any property off undefined throws at module
evaluation time, so the studio fails to load the moment a non-Vite
host imports anything from `@hyperframes/studio`.
Guard the read so the module is loadable everywhere; outside Vite,
every flag falls back to its declared default, preserving Vite
behavior.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 80c88c0 commit 623f948
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
| |||
0 commit comments