Skip to content

Vite env shared#365

Open
mmikhan wants to merge 2 commits intot3-oss:mainfrom
mmikhan:vite-env-shared
Open

Vite env shared#365
mmikhan wants to merge 2 commits intot3-oss:mainfrom
mmikhan:vite-env-shared

Conversation

@mmikhan
Copy link
Copy Markdown
Contributor

@mmikhan mmikhan commented Jun 10, 2025

Changing Vite's server variables to shared variables. Vite seems exposes all the built-in import.meta.env constants o both client and server side (tested as well).

Thanks to @dylanhu7 for noticing this in the original PR 🙏.

With this change, all the built-in constants exposed by Vite shall available in both dev and client side without requiring any client side prefix.

Note

Couldn't figure out why the typecheck is failing 😕

@vercel
Copy link
Copy Markdown

vercel bot commented Jun 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
t3-env ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 6:17pm

@vercel
Copy link
Copy Markdown

vercel bot commented Jun 10, 2025

@mmikhan is attempting to deploy a commit to the t3-oss Team on Vercel.

A member of the Team first needs to authorize it.

@juliusmarminge
Copy link
Copy Markdown
Member

I think we need to ship #316 before to support client/shared presets

@tomerzcod7
Copy link
Copy Markdown

Any update on this? @juliusmarminge this is basically making the vite preset irrelevant if you are building a vite SPA

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.

3 participants