Today, I wondered if the elm compiler could generate static html, which I just tried intuitively like so:
module Test exposing (..) import Html main : Html.Html Never main = Html.text "test"
I wonder if this could be made possible somehow in the future ? It just seems so natural to me, to also use elm for modular static html content, with all it’s benefits.
I think it just fits very natural this way. I know there is for example elm-static, but it is using a node.js DOM and feels rather not so natural (‘is this the elm way ?’) to use for me, since it has a lot of boilerplate and structural complexity behind it.
If I see this code snippet, it just feels right to me, to generate static html this way (or similar).
Maybe there could be a built-in custom type like ‘Static’ which could indicate to generate html ? Like ‘Html Static’ instead of ‘Html Never’ …
What do you people think ? Greetings