ENVIRONMENT variables are on the server, so it makes no sense for client-side Elm code to have access to them at runtime. Elm currently has no build-time flags, dev/test/prod environments like Rails, or other input besides the source files. If you want to have multiple versions of your Elm code controlled at compile-time, you should put them in Elm code (which can be imported as constants from wherever). You could generate this file from your ENVIRONMENT prior to running the compiler in your build process.