We Fixed Environment Variables

preview_player
Показать описание
T3 ENV IS LIVE!

S/O Ph4seOne for the awesome edit 🙏
Рекомендации по теме
Комментарии
Автор

Thanks for giving a shout out to the engineer that actually built it

BSenta
Автор

So you've reinvented config files again? Good job, it only took you 40 years 🥳

rumisbadforyou
Автор

Man I was hoping to find this outside T3 😂

xtz_
Автор

How do you do quick cuts with ur short vids? Lossless cut seems to maybe do that

cyberhighdiver
Автор

How is everyone OK with this... .env could be troublesome sometimes, but importing two new libs to just type check and pre-build validation???

Leon-bbfc
Автор

I used to have to `export FOO=bar`
But now I can add a new library, boilerplates, types, and build steps!
Job security achieved.

pythagoran
Автор

Theo, any way to use enums (strings) instead of just string?

jii
Автор

I frequently use env variables to tree shake in different envs at compile time. For example, any place you have process.env.NODE_ENV compiles to the actual value like "development", which tree shaking will interpret as a literal, which means "if ("development" === "production")" will tree shake out any code in this conditional. The approach in this package requires a runtime check which does not allow for tree shaking. Any thoughts on this tradeoff for this approach?

A common example is for things like integrated devtools that I don't want shipped to production

CommenterAccount
Автор

I've been using this for years 😂
Does your package support merging of .env, .env.local, .env.<environnement> and .env.<environnement>.local ?

FengHuang
Автор

I believe the issue with environment variables is generally that you don't know you need them until something breaks, then you need to find out what the values should be.
It is simply pain, and if not documented properly you'll just cry yourself to sleep at night.

CottidaeSEA
Автор

This package seems promising enough. I had similar issues with env files. I just used the cleanEnv function from the envalid package to fix them.

souvlaki
Автор

How’s it work with eas and react native?

bj
Автор

That red swiggly line is one of the best creative thing, give a pat yourself on the back

spotgaming
Автор

Been ripping ct3a zod env stuff for awhile now, so it's great to have this.

Also, how is the Next starting template sooo bad??? Like ct3a without ANY of the options feels waaay better than the Next default one.

SeanCassiere
Автор

I wonder if dotenv cannot be simirarly augmented. They already have checks and a loading mechanism, and it looks like zod could be used to check either the result or the initial environment variables.

adaliszk
Автор

What is the difference to just plain Zod?

johannes.schaffer
Автор

What's the extension at the bottom of the terminal?

evrylovesironman
Автор

One thing i’ve been looking for is how to detect changes on the settings and have the system reactively adopt the new setting.

For ex - new timeout setting just applies it the api client. But a database url change re-establishes a db connection pool to a new server.

jvliwanag
Автор

Love it. SvelteKit also has something similar.

jepemz
Автор

They suck ass in NextJs for sure, but work great in SvelteKit.

otockian