15:01 | <Francisco Presencia> | I created a small proposal: Any thoughts? It's to standardize environment variables into
If you think this could be valuable, I'll work then on writing a small polyfill and add some tests for the proposal! |
16:17 | <bakkot> | Francisco Presencia: that sort of thing doesn't really make sense in a generic JavaScript runtime, because many runtimes (e.g. the web) don't have a concept of "environment variables". that's really more of a server-specific thing, which is outside of the purview of TC39, but you could try wintercg. wintercg actually has a specific place to track import.meta properties: https://github.com/wintercg/import-meta-registry |
16:23 | <Francisco Presencia> | Ah that makes sense, thanks! I thought on the web as e.g. in React it makes sense to have an environment variable for dev, but you are right that once it's plain JS for web it doesn't make much sense to expect the e.g. browser to have environment variables! I'll update it for WinterCG, thanks! Update: Added the PR to the WinterCG repo! |