Do you mean static data, generated and embedded in the HTML (or imported via javascript)?
Or do you mean dynamic data, i.e. doing a fetch from javascript before initializing the elm app?
The first seems fine to me, the second seems less safe than doing it within Elm.
Note that if you are passing in the flags data as Json.Value, I think you are still inside a Result , unless you Debug.crash on a decode failure (which won’t be allowed in production apps in the future).